Typo: only return error if unrecognise bag type.
authorDr. Stephen Henson <steve@openssl.org>
Thu, 11 Feb 2016 22:46:01 +0000 (22:46 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 11 Feb 2016 23:27:30 +0000 (23:27 +0000)
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
crypto/pkcs12/p12_sbag.c

index 62703b4dc3bd30ed041e6969c72015ad6323db17..57e2bf43df9df53cfc1f9dc51d1fed96fcf9f8b1 100644 (file)
@@ -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);
 }