forked from wolfSSL/wolfssl
Merge pull request #2716 from cariepointer/apache-fixes
Fixes for Apache nightly Jenkins tests
This commit is contained in:
26
src/ssl.c
26
src/ssl.c
@ -6798,6 +6798,10 @@ int wolfSSL_CTX_load_verify_locations_ex(WOLFSSL_CTX* ctx, const char* file,
|
||||
if (file) {
|
||||
ret = ProcessFile(ctx, file, WOLFSSL_FILETYPE_PEM, CA_TYPE, NULL, 0,
|
||||
NULL, verify);
|
||||
#ifndef NO_WOLFSSL_DIR
|
||||
if (ret == WOLFSSL_SUCCESS)
|
||||
successCount++;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (ret == WOLFSSL_SUCCESS && path) {
|
||||
@ -34568,6 +34572,8 @@ void* wolfSSL_GetDhAgreeCtx(WOLFSSL* ssl)
|
||||
|
||||
/* copy contents */
|
||||
XMEMCPY(dup, name, sizeof(WOLFSSL_X509_NAME));
|
||||
InitX509Name(dup, 1);
|
||||
dup->sz = name->sz;
|
||||
|
||||
/* handle dynamic portions */
|
||||
if (name->dynamicName) {
|
||||
@ -34575,8 +34581,8 @@ void* wolfSSL_GetDhAgreeCtx(WOLFSSL* ssl)
|
||||
DYNAMIC_TYPE_OPENSSL))) {
|
||||
goto err;
|
||||
}
|
||||
XMEMCPY(dup->name, name->name, name->sz);
|
||||
}
|
||||
XMEMCPY(dup->name, name->name, name->sz);
|
||||
#if (defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)) && \
|
||||
!defined(NO_ASN)
|
||||
if (!(dup->fullName.fullName = (char*)XMALLOC(name->fullName.fullNameLen,
|
||||
@ -39706,10 +39712,24 @@ void wolfSSL_sk_X509_NAME_pop_free(WOLF_STACK_OF(WOLFSSL_X509_NAME)* sk,
|
||||
XFREE(sk, sk->heap, DYNAMIC_TYPE_OPENSSL);
|
||||
}
|
||||
|
||||
/* Free only the sk structure */
|
||||
/* Free only the sk structure, NOT X509_NAME members */
|
||||
void wolfSSL_sk_X509_NAME_free(WOLF_STACK_OF(WOLFSSL_X509_NAME)* sk)
|
||||
{
|
||||
wolfSSL_sk_X509_NAME_pop_free(sk, NULL);
|
||||
WOLFSSL_STACK* node;
|
||||
WOLFSSL_ENTER("wolfSSL_sk_X509_NAME_free");
|
||||
|
||||
if (sk == NULL)
|
||||
return;
|
||||
|
||||
node = sk->next;
|
||||
while (sk->num > 1) {
|
||||
WOLFSSL_STACK* tmp = node;
|
||||
node = node->next;
|
||||
XFREE(tmp, NULL, DYNAMIC_TYPE_OPENSSL);
|
||||
sk->num -= 1;
|
||||
}
|
||||
|
||||
XFREE(sk, sk->heap, DYNAMIC_TYPE_OPENSSL);
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_APACHE_HTTPD) || defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX)
|
||||
|
@ -210,7 +210,13 @@ typedef WOLFSSL_X509_VERIFY_PARAM X509_VERIFY_PARAM;
|
||||
#ifndef NO_FILESYSTEM
|
||||
#define SSL_CTX_use_certificate_file wolfSSL_CTX_use_certificate_file
|
||||
#define SSL_CTX_use_PrivateKey_file wolfSSL_CTX_use_PrivateKey_file
|
||||
#ifdef WOLFSSL_APACHE_HTTPD
|
||||
#define SSL_CTX_load_verify_locations(ctx,file,path) \
|
||||
wolfSSL_CTX_load_verify_locations_ex(ctx,file,path,\
|
||||
WOLFSSL_LOAD_FLAG_IGNORE_ERR)
|
||||
#else
|
||||
#define SSL_CTX_load_verify_locations wolfSSL_CTX_load_verify_locations
|
||||
#endif
|
||||
#define SSL_CTX_use_certificate_chain_file wolfSSL_CTX_use_certificate_chain_file
|
||||
#define SSL_CTX_use_RSAPrivateKey_file wolfSSL_CTX_use_RSAPrivateKey_file
|
||||
|
||||
|
Reference in New Issue
Block a user