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:
@@ -30,13 +30,10 @@ import (
|
||||
|
||||
"errors"
|
||||
"fmt"
|
||||
"hash"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/crypto/pbkdf2"
|
||||
"golang.org/x/crypto/scrypt"
|
||||
"hash"
|
||||
"os"
|
||||
)
|
||||
|
||||
// as defined in https://datatracker.ietf.org/doc/html/rfc8018#appendix-A.4
|
||||
@@ -239,9 +236,6 @@ func readPKCS8PrivateKey(privateKeyId string) (crypto.PrivateKey, error) {
|
||||
func readPKCS8EncryptedPrivateKey(privateKeyId string, pkcs8Password []byte) (crypto.PrivateKey, error) {
|
||||
block, err := parseDERFromPEMForPKCS8(privateKeyId, encryptedBlockType)
|
||||
if err != nil {
|
||||
if Debug && strings.Contains(err.Error(), `The block type detected is PRIVATE KEY`) {
|
||||
log.Println("PKCS#8 password provided but block type indicates that one isn't required.")
|
||||
}
|
||||
return nil, errors.New("could not parse PEM data")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user