mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-05-05 15:04:13 +02:00
extra checks for OPENSSL_VERSION_NUMBER for API prototype differences
This commit is contained in:
@@ -10529,7 +10529,11 @@ int wolfSSL_X509_EXTENSION_set_critical(WOLFSSL_X509_EXTENSION* ex, int crit)
|
||||
* other extension types return a pointer to a v3_ext_method struct that contains
|
||||
* only the NID.
|
||||
*/
|
||||
#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
const WOLFSSL_v3_ext_method* wolfSSL_X509V3_EXT_get(WOLFSSL_X509_EXTENSION* ex)
|
||||
#else
|
||||
WOLFSSL_v3_ext_method* wolfSSL_X509V3_EXT_get(WOLFSSL_X509_EXTENSION* ex)
|
||||
#endif
|
||||
{
|
||||
int nid;
|
||||
WOLFSSL_v3_ext_method method;
|
||||
@@ -10585,7 +10589,11 @@ const WOLFSSL_v3_ext_method* wolfSSL_X509V3_EXT_get(WOLFSSL_X509_EXTENSION* ex)
|
||||
method.ext_nid = nid;
|
||||
ex->ext_method = method;
|
||||
|
||||
#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
return (const WOLFSSL_v3_ext_method*)&ex->ext_method;
|
||||
#else
|
||||
return (WOLFSSL_v3_ext_method*)&ex->ext_method;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Parses and returns an x509v3 extension internal structure.
|
||||
|
||||
Reference in New Issue
Block a user