forked from wolfSSL/wolfssl
add X509 new function
This commit is contained in:
14
src/ssl.c
14
src/ssl.c
@ -15886,6 +15886,20 @@ void wolfSSL_X509_free(WOLFSSL_X509* x509)
|
|||||||
WOLFSSL_ENTER("wolfSSL_X509_free");
|
WOLFSSL_ENTER("wolfSSL_X509_free");
|
||||||
ExternalFreeX509(x509);
|
ExternalFreeX509(x509);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WOLFSSL_X509* wolfSSL_X509_new()
|
||||||
|
{
|
||||||
|
WOLFSSL_X509* x509;
|
||||||
|
|
||||||
|
x509 = (WOLFSSL_X509*)XMALLOC(sizeof(WOLFSSL_X509), NULL,
|
||||||
|
DYNAMIC_TYPE_X509);
|
||||||
|
if (x509 != NULL) {
|
||||||
|
InitX509(x509, 1, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
return x509;
|
||||||
|
}
|
||||||
#endif /* NO_CERTS */
|
#endif /* NO_CERTS */
|
||||||
|
|
||||||
|
|
||||||
|
@ -228,6 +228,7 @@ typedef WOLFSSL_X509_STORE_CTX X509_STORE_CTX;
|
|||||||
#define X509_get_ext_d2i wolfSSL_X509_get_ext_d2i
|
#define X509_get_ext_d2i wolfSSL_X509_get_ext_d2i
|
||||||
#define X509_digest wolfSSL_X509_digest
|
#define X509_digest wolfSSL_X509_digest
|
||||||
#define X509_free wolfSSL_X509_free
|
#define X509_free wolfSSL_X509_free
|
||||||
|
#define X509_new wolfSSL_X509_new
|
||||||
#define OPENSSL_free wolfSSL_OPENSSL_free
|
#define OPENSSL_free wolfSSL_OPENSSL_free
|
||||||
#define OPENSSL_malloc wolfSSL_OPENSSL_malloc
|
#define OPENSSL_malloc wolfSSL_OPENSSL_malloc
|
||||||
|
|
||||||
|
@ -645,6 +645,7 @@ WOLFSSL_API const char* wolfSSL_get_cipher(WOLFSSL*);
|
|||||||
WOLFSSL_API WOLFSSL_SESSION* wolfSSL_get1_session(WOLFSSL* ssl);
|
WOLFSSL_API WOLFSSL_SESSION* wolfSSL_get1_session(WOLFSSL* ssl);
|
||||||
/* what's ref count */
|
/* what's ref count */
|
||||||
|
|
||||||
|
WOLFSSL_API WOLFSSL_X509* wolfSSL_X509_new(void);
|
||||||
WOLFSSL_API void wolfSSL_X509_free(WOLFSSL_X509*);
|
WOLFSSL_API void wolfSSL_X509_free(WOLFSSL_X509*);
|
||||||
|
|
||||||
#ifdef OPENSSL_EXTRA
|
#ifdef OPENSSL_EXTRA
|
||||||
|
Reference in New Issue
Block a user