aboutsummaryrefslogtreecommitdiff
path: root/pkcs12/crypto.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkcs12/crypto.go')
-rw-r--r--pkcs12/crypto.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkcs12/crypto.go b/pkcs12/crypto.go
index 484ca51..96f4a1a 100644
--- a/pkcs12/crypto.go
+++ b/pkcs12/crypto.go
@@ -117,7 +117,7 @@ func pbDecrypt(info decryptable, password []byte) (decrypted []byte, err error)
}
ps := decrypted[len(decrypted)-psLen:]
decrypted = decrypted[:len(decrypted)-psLen]
- if bytes.Compare(ps, bytes.Repeat([]byte{byte(psLen)}, psLen)) != 0 {
+ if !bytes.Equal(ps, bytes.Repeat([]byte{byte(psLen)}, psLen)) {
return nil, ErrDecryption
}