Skip to content

Commit

Permalink
cert: fix dropped errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alrs committed Aug 29, 2023
1 parent 076ebc6 commit 574e814
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 574e814

Please sign in to comment.