mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Compatibility Layer Fixes
This commit is contained in:
17
src/ssl.c
17
src/ssl.c
@ -9865,7 +9865,7 @@ int wolfSSL_use_PrivateKey(WOLFSSL* ssl, WOLFSSL_EVP_PKEY* pkey)
|
||||
}
|
||||
|
||||
|
||||
int wolfSSL_use_PrivateKey_ASN1(int pri, WOLFSSL* ssl, unsigned char* der,
|
||||
int wolfSSL_use_PrivateKey_ASN1(int pri, WOLFSSL* ssl, const unsigned char* der,
|
||||
long derSz)
|
||||
{
|
||||
WOLFSSL_ENTER("wolfSSL_use_PrivateKey_ASN1");
|
||||
@ -9930,7 +9930,8 @@ int wolfSSL_use_certificate(WOLFSSL* ssl, WOLFSSL_X509* x509)
|
||||
#endif /* OPENSSL_EXTRA */
|
||||
|
||||
#ifndef NO_CERTS
|
||||
int wolfSSL_use_certificate_ASN1(WOLFSSL* ssl, unsigned char* der, int derSz)
|
||||
int wolfSSL_use_certificate_ASN1(WOLFSSL* ssl, const unsigned char* der,
|
||||
int derSz)
|
||||
{
|
||||
long idx;
|
||||
|
||||
@ -21638,6 +21639,7 @@ int wolfSSL_X509_cmp(const WOLFSSL_X509 *a, const WOLFSSL_X509 *b)
|
||||
/* free any existing data before copying */
|
||||
if (asn1->data != NULL && asn1->isDynamic) {
|
||||
XFREE(asn1->data, NULL, DYNAMIC_TYPE_OPENSSL);
|
||||
asn1->data = NULL;
|
||||
}
|
||||
|
||||
if (sz > CTC_NAME_SIZE) {
|
||||
@ -21651,6 +21653,7 @@ int wolfSSL_X509_cmp(const WOLFSSL_X509 *a, const WOLFSSL_X509 *b)
|
||||
else {
|
||||
XMEMSET(asn1->strData, 0, CTC_NAME_SIZE);
|
||||
asn1->data = asn1->strData;
|
||||
asn1->isDynamic = 0;
|
||||
}
|
||||
if (data != NULL) {
|
||||
XMEMCPY(asn1->data, data, sz);
|
||||
@ -31458,8 +31461,8 @@ int wolfSSL_EVP_PKEY_set1_RSA(WOLFSSL_EVP_PKEY *pkey, WOLFSSL_RSA *key)
|
||||
}
|
||||
#endif /* !NO_RSA */
|
||||
|
||||
#if defined(OPENSSL_ALL) || defined(WOLFSSL_QT)
|
||||
#ifndef NO_DSA
|
||||
#if defined(OPENSSL_ALL) || defined(WOLFSSL_QT) || defined(OPENSSL_EXTRA)
|
||||
#if !defined (NO_DSA) && !defined(HAVE_SELFTEST) && defined(WOLFSSL_KEY_GEN)
|
||||
/* with set1 functions the pkey struct does not own the DSA structure
|
||||
*
|
||||
* returns WOLFSSL_SUCCESS on success and WOLFSSL_FAILURE on failure
|
||||
@ -31566,7 +31569,7 @@ WOLFSSL_DSA* wolfSSL_EVP_PKEY_get1_DSA(WOLFSSL_EVP_PKEY* key)
|
||||
}
|
||||
return local;
|
||||
}
|
||||
#endif /* !NO_DSA */
|
||||
#endif /* !NO_DSA && !HAVE_SELFTEST && WOLFSSL_KEY_GEN */
|
||||
|
||||
#ifdef HAVE_ECC
|
||||
WOLFSSL_EC_KEY *wolfSSL_EVP_PKEY_get0_EC_KEY(WOLFSSL_EVP_PKEY *pkey)
|
||||
@ -31616,7 +31619,9 @@ WOLFSSL_EC_KEY* wolfSSL_EVP_PKEY_get1_EC_KEY(WOLFSSL_EVP_PKEY* key)
|
||||
return local;
|
||||
}
|
||||
#endif /* HAVE_ECC */
|
||||
#endif /* OPENSSL_ALL || WOLFSSL_QT || OPENSSL_EXTRA */
|
||||
|
||||
#if defined(OPENSSL_ALL) || defined(WOLFSSL_QT)
|
||||
#if !defined(NO_DH) && !defined(NO_FILESYSTEM)
|
||||
/* with set1 functions the pkey struct does not own the DH structure
|
||||
* Build the following DH Key format from the passed in WOLFSSL_DH
|
||||
@ -41214,6 +41219,7 @@ long wolfSSL_ctrl(WOLFSSL* ssl, int cmd, long opt, void* pt)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
switch (cmd) {
|
||||
#if defined(WOLFSSL_NGINX) || defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||
case SSL_CTRL_SET_TLSEXT_HOSTNAME:
|
||||
WOLFSSL_MSG("Entering Case: SSL_CTRL_SET_TLSEXT_HOSTNAME.");
|
||||
#ifdef HAVE_SNI
|
||||
@ -41226,6 +41232,7 @@ long wolfSSL_ctrl(WOLFSSL* ssl, int cmd, long opt, void* pt)
|
||||
WOLFSSL_MSG("SNI not enabled.");
|
||||
break;
|
||||
#endif /* HAVE_SNI */
|
||||
#endif /* WOLFSSL_NGINX || WOLFSSL_QT || OPENSSL_ALL */
|
||||
default:
|
||||
WOLFSSL_MSG("Case not implemented.");
|
||||
}
|
||||
|
@ -2236,8 +2236,8 @@ WOLFSSL_API int wolfSSL_make_eap_keys(WOLFSSL*, void* key, unsigned int len,
|
||||
/* SSL versions */
|
||||
WOLFSSL_API int wolfSSL_use_certificate_buffer(WOLFSSL*, const unsigned char*,
|
||||
long, int);
|
||||
WOLFSSL_API int wolfSSL_use_certificate_ASN1(WOLFSSL* ssl, unsigned char* der,
|
||||
int derSz);
|
||||
WOLFSSL_API int wolfSSL_use_certificate_ASN1(WOLFSSL* ssl,
|
||||
const unsigned char* der, int derSz);
|
||||
WOLFSSL_API int wolfSSL_use_PrivateKey_buffer(WOLFSSL*, const unsigned char*,
|
||||
long, int);
|
||||
WOLFSSL_API int wolfSSL_use_PrivateKey_id(WOLFSSL*, const unsigned char*,
|
||||
@ -3205,7 +3205,7 @@ WOLFSSL_API int wolfSSL_X509_digest(const WOLFSSL_X509* x509,
|
||||
WOLFSSL_API int wolfSSL_use_certificate(WOLFSSL* ssl, WOLFSSL_X509* x509);
|
||||
WOLFSSL_API int wolfSSL_use_PrivateKey(WOLFSSL* ssl, WOLFSSL_EVP_PKEY* pkey);
|
||||
WOLFSSL_API int wolfSSL_use_PrivateKey_ASN1(int pri, WOLFSSL* ssl,
|
||||
unsigned char* der, long derSz);
|
||||
const unsigned char* der, long derSz);
|
||||
WOLFSSL_API WOLFSSL_EVP_PKEY *wolfSSL_get_privatekey(const WOLFSSL *ssl);
|
||||
#ifndef NO_RSA
|
||||
WOLFSSL_API int wolfSSL_use_RSAPrivateKey_ASN1(WOLFSSL* ssl, unsigned char* der,
|
||||
|
Reference in New Issue
Block a user