You've already forked aws-iam-anywhere-refresher
Trust me, it's not badly written. It's just way above your head.
Some checks failed
🏗️✨ Test Build Workflow / 🖥️ 🔨 Build (push) Has been cancelled
Some checks failed
🏗️✨ Test Build Workflow / 🖥️ 🔨 Build (push) Has been cancelled
This commit is contained in:
@@ -612,14 +612,11 @@ func encodeDer(der []byte) (string, error) {
|
||||
}
|
||||
|
||||
func parseDERFromPEM(pemDataId string, blockType string) (*pem.Block, error) {
|
||||
bts, err := os.ReadFile(pemDataId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b := []byte(pemDataId)
|
||||
|
||||
var block *pem.Block
|
||||
for len(bts) > 0 {
|
||||
block, bts = pem.Decode(bts)
|
||||
for len(b) > 0 {
|
||||
block, b = pem.Decode(b)
|
||||
if block == nil {
|
||||
return nil, errors.New("unable to parse PEM data")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user