Skip to content

Commit

Permalink
cert: fix dropped errors (#961)
Browse files Browse the repository at this point in the history
  • Loading branch information
alrs authored Sep 7, 2023
1 parent f7e3929 commit dbdb48f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cert/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ func EncryptAndMarshalSigningPrivateKey(curve Curve, b []byte, passphrase []byte
},
Ciphertext: ciphertext,
})
if err != nil {
return nil, err
}

switch curve {
case Curve_CURVE25519:
Expand Down
3 changes: 3 additions & 0 deletions cert/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ func aes256Decrypt(passphrase []byte, kdfParams *Argon2Parameters, data []byte)
}

gcm, err := cipher.NewGCM(block)
if err != nil {
return nil, err
}

nonce, ciphertext, err := splitNonceCiphertext(data, gcm.NonceSize())
if err != nil {
Expand Down

0 comments on commit dbdb48f

Please sign in to comment.