macro guard on EncodePolicyOID use

This commit is contained in:
Jacob Barthelmeh
2019-04-18 14:56:24 -06:00
parent efc96e40d1
commit ec2849b885
2 changed files with 4 additions and 0 deletions

View File

@@ -32365,6 +32365,7 @@ void* wolfSSL_GetDhAgreeCtx(WOLFSSL* ssl)
} }
#endif #endif
#ifdef WOLFSSL_CERT_EXT
/* Gets the NID value that is related to the OID string passed in. Example /* Gets the NID value that is related to the OID string passed in. Example
* string would be "2.5.29.14" for subject key ID. * string would be "2.5.29.14" for subject key ID.
* *
@@ -32403,6 +32404,7 @@ void* wolfSSL_GetDhAgreeCtx(WOLFSSL* ssl)
} }
return NID_undef; return NID_undef;
} }
#endif /* WOLFSSL_CERT_EXT */
/* compatibility function. It's intended use is to remove OID's from an /* compatibility function. It's intended use is to remove OID's from an

View File

@@ -20758,7 +20758,9 @@ static void test_wolfSSL_OBJ(void)
AssertNotNull(obj = OBJ_nid2obj(NID_sha256)); AssertNotNull(obj = OBJ_nid2obj(NID_sha256));
AssertIntEQ(OBJ_obj2nid(obj), NID_sha256); AssertIntEQ(OBJ_obj2nid(obj), NID_sha256);
AssertIntEQ(OBJ_obj2txt(buf, (int)sizeof(buf), obj, 1), 22); AssertIntEQ(OBJ_obj2txt(buf, (int)sizeof(buf), obj, 1), 22);
#ifdef WOLFSSL_CERT_EXT
AssertIntEQ(OBJ_txt2nid(buf), NID_sha256); AssertIntEQ(OBJ_txt2nid(buf), NID_sha256);
#endif
AssertIntGT(OBJ_obj2txt(buf, (int)sizeof(buf), obj, 0), 0); AssertIntGT(OBJ_obj2txt(buf, (int)sizeof(buf), obj, 0), 0);
ASN1_OBJECT_free(obj); ASN1_OBJECT_free(obj);