summaryrefslogtreecommitdiffstats
path: root/crypto/pkcs12
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-02-11 22:46:01 +0000
committerDr. Stephen Henson <steve@openssl.org>2016-02-11 23:27:30 +0000
commitb3ca51559b1a6cd80dc179ee54613f00190d1cb4 (patch)
treea87984ec17181bb32b9f47ee2c4e1bf68b26db5e /crypto/pkcs12
parentde8128203a5340db397dadaee91bc504c2a539bc (diff)
Typo: only return error if unrecognise bag type.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Diffstat (limited to 'crypto/pkcs12')
-rw-r--r--crypto/pkcs12/p12_sbag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/pkcs12/p12_sbag.c b/crypto/pkcs12/p12_sbag.c
index 62703b4dc3..57e2bf43df 100644
--- a/crypto/pkcs12/p12_sbag.c
+++ b/crypto/pkcs12/p12_sbag.c
@@ -107,7 +107,7 @@ int PKCS12_SAFEBAG_get_bag_nid(PKCS12_SAFEBAG *bag)
{
int btype = PKCS12_SAFEBAG_get_nid(bag);
- if (btype != NID_certBag || btype != NID_crlBag || btype != NID_secretBag)
+ if (btype != NID_certBag && btype != NID_crlBag && btype != NID_secretBag)
return -1;
return OBJ_obj2nid(bag->value.bag->type);
}