Skip to content

Commit

Permalink
Fix typo in variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
maraino committed Jul 8, 2022
1 parent 28edbd3 commit b6afa3c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pemutil/pkcs8.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ var (

// encryption
oidAES128CBC = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 2}
oidAES196CBC = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 22}
oidAES192CBC = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 22}
oidAES256CBC = asn1.ObjectIdentifier{2, 16, 840, 1, 101, 3, 4, 1, 42}
oidDESCBC = asn1.ObjectIdentifier{1, 3, 14, 3, 2, 7}
oidD3DESCBC = asn1.ObjectIdentifier{1, 2, 840, 113549, 3, 7}
Expand Down Expand Up @@ -132,7 +132,7 @@ var rfc1423Algos = []rfc1423Algo{{
cipherFunc: aes.NewCipher,
keySize: 24,
blockSize: aes.BlockSize,
identifier: oidAES196CBC,
identifier: oidAES192CBC,
}, {
cipher: x509.PEMCipherAES256,
name: "AES-256-CBC",
Expand Down Expand Up @@ -225,7 +225,7 @@ func DecryptPKCS8PrivateKey(data, password []byte) ([]byte, error) {
case encParam.EncryAlgo.Equal(oidAES128CBC):
symkey = pbkdf2.Key(password, salt, iter, 16, keyHash)
block, err = aes.NewCipher(symkey)
case encParam.EncryAlgo.Equal(oidAES196CBC):
case encParam.EncryAlgo.Equal(oidAES192CBC):
symkey = pbkdf2.Key(password, salt, iter, 24, keyHash)
block, err = aes.NewCipher(symkey)
case encParam.EncryAlgo.Equal(oidAES256CBC):
Expand Down

0 comments on commit b6afa3c

Please sign in to comment.