forked from wolfSSL/wolfssl
Merge pull request #2833 from JacobBarthelmeh/Compatibility-Layer
compile for NO_WOLFSSL_STUB
This commit is contained in:
@ -21093,9 +21093,11 @@ int wolfSSL_sk_push(WOLFSSL_STACK* sk, const void *data)
|
|||||||
case STACK_TYPE_X509:
|
case STACK_TYPE_X509:
|
||||||
ret = wolfSSL_sk_X509_push(sk, (WOLFSSL_X509*) data);
|
ret = wolfSSL_sk_X509_push(sk, (WOLFSSL_X509*) data);
|
||||||
break;
|
break;
|
||||||
|
#ifndef NO_WOLFSSL_STUB
|
||||||
case STACK_TYPE_CIPHER:
|
case STACK_TYPE_CIPHER:
|
||||||
ret = wolfSSL_sk_CIPHER_push(sk, (WOLFSSL_CIPHER*) data);
|
ret = wolfSSL_sk_CIPHER_push(sk, (WOLFSSL_CIPHER*) data);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case STACK_TYPE_GEN_NAME:
|
case STACK_TYPE_GEN_NAME:
|
||||||
ret = wolfSSL_sk_ASN1_OBJECT_push(sk, (WOLFSSL_ASN1_OBJECT*) data);
|
ret = wolfSSL_sk_ASN1_OBJECT_push(sk, (WOLFSSL_ASN1_OBJECT*) data);
|
||||||
break;
|
break;
|
||||||
@ -41880,7 +41882,6 @@ err:
|
|||||||
return (ret == 0) ? WOLFSSL_SUCCESS : WOLFSSL_FAILURE;
|
return (ret == 0) ? WOLFSSL_SUCCESS : WOLFSSL_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_WOLFSSL_STUB
|
|
||||||
int wolfSSL_BIO_read_filename(WOLFSSL_BIO *b, const char *name) {
|
int wolfSSL_BIO_read_filename(WOLFSSL_BIO *b, const char *name) {
|
||||||
#ifndef NO_FILESYSTEM
|
#ifndef NO_FILESYSTEM
|
||||||
XFILE fp;
|
XFILE fp;
|
||||||
@ -41909,7 +41910,6 @@ err:
|
|||||||
return WOLFSSL_NOT_IMPLEMENTED;
|
return WOLFSSL_NOT_IMPLEMENTED;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Return the corresponding short name for the nid <n>.
|
/* Return the corresponding short name for the nid <n>.
|
||||||
* or NULL if short name can't be found.
|
* or NULL if short name can't be found.
|
||||||
|
@ -25803,6 +25803,7 @@ static void test_wolfSSL_RSA_meth(void)
|
|||||||
AssertNotNull(rsa_meth =
|
AssertNotNull(rsa_meth =
|
||||||
RSA_meth_new("placeholder RSA method", RSA_METHOD_FLAG_NO_CHECK));
|
RSA_meth_new("placeholder RSA method", RSA_METHOD_FLAG_NO_CHECK));
|
||||||
|
|
||||||
|
#ifndef NO_WOLFSSL_STUB
|
||||||
AssertIntEQ(RSA_meth_set_pub_enc(rsa_meth, NULL), 1);
|
AssertIntEQ(RSA_meth_set_pub_enc(rsa_meth, NULL), 1);
|
||||||
AssertIntEQ(RSA_meth_set_pub_dec(rsa_meth, NULL), 1);
|
AssertIntEQ(RSA_meth_set_pub_dec(rsa_meth, NULL), 1);
|
||||||
AssertIntEQ(RSA_meth_set_priv_enc(rsa_meth, NULL), 1);
|
AssertIntEQ(RSA_meth_set_priv_enc(rsa_meth, NULL), 1);
|
||||||
@ -25810,6 +25811,7 @@ static void test_wolfSSL_RSA_meth(void)
|
|||||||
AssertIntEQ(RSA_meth_set_init(rsa_meth, NULL), 1);
|
AssertIntEQ(RSA_meth_set_init(rsa_meth, NULL), 1);
|
||||||
AssertIntEQ(RSA_meth_set_finish(rsa_meth, NULL), 1);
|
AssertIntEQ(RSA_meth_set_finish(rsa_meth, NULL), 1);
|
||||||
AssertIntEQ(RSA_meth_set0_app_data(rsa_meth, NULL), 1);
|
AssertIntEQ(RSA_meth_set0_app_data(rsa_meth, NULL), 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
AssertNotNull(rsa = RSA_new());
|
AssertNotNull(rsa = RSA_new());
|
||||||
AssertIntEQ(RSA_set_method(rsa, rsa_meth), 1);
|
AssertIntEQ(RSA_set_method(rsa, rsa_meth), 1);
|
||||||
@ -31178,7 +31180,9 @@ static void test_openssl_generate_key_and_cert(void)
|
|||||||
AssertNotNull(pkey);
|
AssertNotNull(pkey);
|
||||||
AssertNotNull(ec_key);
|
AssertNotNull(ec_key);
|
||||||
|
|
||||||
|
#ifndef NO_WOLFSSL_STUB
|
||||||
EC_KEY_set_asn1_flag(ec_key, OPENSSL_EC_NAMED_CURVE);
|
EC_KEY_set_asn1_flag(ec_key, OPENSSL_EC_NAMED_CURVE);
|
||||||
|
#endif
|
||||||
|
|
||||||
AssertIntNE(EC_KEY_generate_key(ec_key), 0);
|
AssertIntNE(EC_KEY_generate_key(ec_key), 0);
|
||||||
AssertIntNE(EVP_PKEY_assign_EC_KEY(pkey, ec_key), 0);
|
AssertIntNE(EVP_PKEY_assign_EC_KEY(pkey, ec_key), 0);
|
||||||
|
Reference in New Issue
Block a user