Typo: only return error if unrecognise bag type.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
diff --git a/crypto/pkcs12/p12_sbag.c b/crypto/pkcs12/p12_sbag.c
index 62703b4..57e2bf4 100644
--- a/crypto/pkcs12/p12_sbag.c
+++ b/crypto/pkcs12/p12_sbag.c
@@ -107,7 +107,7 @@
{
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);
}