Merge pull request #1189 from dgarske/fix_oldnames

Fix for building with `--disable-oldnames`
This commit is contained in:
Chris Conlon 2017-10-18 13:34:26 -06:00 committed by GitHub
commit 06f564dea3
6 changed files with 24 additions and 24 deletions

View File

@ -1978,7 +1978,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
if (err == WOLFSSL_SUCCESS)
printf("Received ALPN protocol : %s (%d)\n",
protocol_name, protocol_nameSz);
else if (err == SSL_ALPN_NOT_FOUND)
else if (err == WOLFSSL_ALPN_NOT_FOUND)
printf("No ALPN response received (no match with server)\n");
else
printf("Getting ALPN protocol name failed\n");
@ -2236,7 +2236,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
if (err == WOLFSSL_SUCCESS)
printf("Received ALPN protocol : %s (%d)\n",
protocol_name, protocol_nameSz);
else if (err == SSL_ALPN_NOT_FOUND)
else if (err == WOLFSSL_ALPN_NOT_FOUND)
printf("Not received ALPN response (no match with server)\n");
else
printf("Getting ALPN protocol name failed\n");

View File

@ -1388,7 +1388,7 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
if (err == WOLFSSL_SUCCESS)
printf("Sent ALPN protocol : %s (%d)\n",
protocol_name, protocol_nameSz);
else if (err == SSL_ALPN_NOT_FOUND)
else if (err == WOLFSSL_ALPN_NOT_FOUND)
printf("No ALPN response sent (no match)\n");
else
printf("Getting ALPN protocol name failed\n");

View File

@ -13272,7 +13272,7 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md)
int wolfSSL_EVP_DigestInit(WOLFSSL_EVP_MD_CTX* ctx,
const WOLFSSL_EVP_MD* type)
{
int ret = SSL_SUCCESS;
int ret = WOLFSSL_SUCCESS;
WOLFSSL_ENTER("EVP_DigestInit");
@ -16422,25 +16422,25 @@ WOLFSSL_ASN1_INTEGER* wolfSSL_X509_get_serialNumber(WOLFSSL_X509* x509)
int wolfSSL_ASN1_TIME_print(WOLFSSL_BIO* bio, const WOLFSSL_ASN1_TIME* asnTime)
{
char buf[MAX_TIME_STRING_SZ];
int ret = SSL_SUCCESS;
int ret = WOLFSSL_SUCCESS;
WOLFSSL_ENTER("wolfSSL_ASN1_TIME_print");
if (bio == NULL || asnTime == NULL) {
WOLFSSL_MSG("NULL function argument");
return SSL_FAILURE;
return WOLFSSL_FAILURE;
}
if (wolfSSL_ASN1_TIME_to_string((WOLFSSL_ASN1_TIME*)asnTime, buf,
sizeof(buf)) == NULL) {
XMEMSET(buf, 0, MAX_TIME_STRING_SZ);
XMEMCPY(buf, "Bad time value", 14);
ret = SSL_FAILURE;
ret = WOLFSSL_FAILURE;
}
if (wolfSSL_BIO_write(bio, buf, (int)XSTRLEN(buf)) <= 0) {
WOLFSSL_MSG("Unable to write to bio");
return SSL_FAILURE;
return WOLFSSL_FAILURE;
}
return ret;
@ -18090,7 +18090,7 @@ int wolfSSL_BN_sub(WOLFSSL_BIGNUM* r, const WOLFSSL_BIGNUM* a,
return 0;
}
/* SSL_SUCCESS on ok */
/* WOLFSSL_SUCCESS on ok */
int wolfSSL_BN_mod(WOLFSSL_BIGNUM* r, const WOLFSSL_BIGNUM* a,
const WOLFSSL_BIGNUM* b, const WOLFSSL_BN_CTX* c)
{
@ -18406,7 +18406,7 @@ int wolfSSL_BN_set_bit(WOLFSSL_BIGNUM* bn, int n)
}
/* SSL_SUCCESS on ok */
/* WOLFSSL_SUCCESS on ok */
/* Note on use: this function expects str to be an even length. It is
* converting pairs of bytes into 8-bit values. As an example, the RSA
* public exponent is commonly 0x010001. To get it to convert, you need
@ -19801,7 +19801,7 @@ int wolfSSL_RSA_public_encrypt(int len, const unsigned char* fr,
{
WOLFSSL_MSG("No RSA internal set, do it");
if (SetRsaInternal(rsa) != SSL_SUCCESS) {
if (SetRsaInternal(rsa) != WOLFSSL_SUCCESS) {
WOLFSSL_MSG("SetRsaInternal failed");
return 0;
}
@ -19898,7 +19898,7 @@ int wolfSSL_RSA_private_decrypt(int len, const unsigned char* fr,
{
WOLFSSL_MSG("No RSA internal set, do it");
if (SetRsaInternal(rsa) != SSL_SUCCESS) {
if (SetRsaInternal(rsa) != WOLFSSL_SUCCESS) {
WOLFSSL_MSG("SetRsaInternal failed");
return 0;
}

View File

@ -1352,7 +1352,7 @@ int TLSX_ALPN_GetRequest(TLSX* extensions, void** data, word16 *dataSz)
extension = TLSX_Find(extensions, TLSX_APPLICATION_LAYER_PROTOCOL);
if (extension == NULL) {
WOLFSSL_MSG("TLS extension not found");
return SSL_ALPN_NOT_FOUND;
return WOLFSSL_ALPN_NOT_FOUND;
}
alpn = (ALPN *)extension->data;
@ -1373,7 +1373,7 @@ int TLSX_ALPN_GetRequest(TLSX* extensions, void** data, word16 *dataSz)
/* continue without negotiated protocol */
WOLFSSL_MSG("No protocol match with peer -> Continue");
return SSL_ALPN_NOT_FOUND;
return WOLFSSL_ALPN_NOT_FOUND;
}
if (alpn->next != NULL) {

View File

@ -480,7 +480,7 @@ static void test_wolfSSL_CTX_load_verify_locations(void)
cacheSz = wolfSSL_CTX_get_cert_cache_memsize(ctx);
#endif
/* Test unloading CA's */
AssertIntEQ(SSL_SUCCESS, wolfSSL_CTX_UnloadCAs(ctx));
AssertIntEQ(WOLFSSL_SUCCESS, wolfSSL_CTX_UnloadCAs(ctx));
#ifdef PERSIST_CERT_CACHE
/* Verify no certs (result is less than cacheSz) */
@ -494,7 +494,7 @@ static void test_wolfSSL_CTX_load_verify_locations(void)
AssertNotNull(cm = wolfSSL_CTX_GetCertManager(ctx));
/* Test unloading CA's using CM */
AssertIntEQ(SSL_SUCCESS, wolfSSL_CertManagerUnloadCAs(cm));
AssertIntEQ(WOLFSSL_SUCCESS, wolfSSL_CertManagerUnloadCAs(cm));
#ifdef PERSIST_CERT_CACHE
/* Verify no certs (result is less than cacheSz) */
@ -2063,7 +2063,7 @@ static void verify_ALPN_not_matching_continue(WOLFSSL* ssl)
char *proto = NULL;
word16 protoSz = 0;
AssertIntEQ(SSL_ALPN_NOT_FOUND,
AssertIntEQ(WOLFSSL_ALPN_NOT_FOUND,
wolfSSL_ALPN_GetProtocol(ssl, &proto, &protoSz));
/* check value */
@ -9495,7 +9495,7 @@ static void test_wolfSSL_ASN1_TIME_print()
AssertNotNull(bio = BIO_new(BIO_s_mem()));
AssertNotNull(x509 = wolfSSL_X509_load_certificate_buffer(der,
sizeof_client_cert_der_2048, SSL_FILETYPE_ASN1));
sizeof_client_cert_der_2048, WOLFSSL_FILETYPE_ASN1));
AssertIntEQ(ASN1_TIME_print(bio, X509_get_notBefore(x509)), 1);
AssertIntEQ(BIO_read(bio, buf, sizeof(buf)), 24);
AssertIntEQ(XMEMCMP(buf, "Aug 11 20:07:37 2016 GMT", sizeof(buf) - 1), 0);

View File

@ -2846,7 +2846,7 @@ void bench_hmac_md5(int doAsync)
byte key[] = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b };
bench_hmac(doAsync, MD5, MD5_DIGEST_SIZE, key, sizeof(key),
bench_hmac(doAsync, WC_MD5, WC_MD5_DIGEST_SIZE, key, sizeof(key),
"HMAC-MD5");
}
@ -2860,7 +2860,7 @@ void bench_hmac_sha(int doAsync)
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
0x0b, 0x0b, 0x0b, 0x0b };
bench_hmac(doAsync, SHA, SHA_DIGEST_SIZE, key, sizeof(key),
bench_hmac(doAsync, WC_SHA, WC_SHA_DIGEST_SIZE, key, sizeof(key),
"HMAC-SHA");
}
@ -2875,7 +2875,7 @@ void bench_hmac_sha224(int doAsync)
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
0x0b, 0x0b, 0x0b, 0x0b };
bench_hmac(doAsync, SHA224, SHA224_DIGEST_SIZE, key, sizeof(key),
bench_hmac(doAsync, WC_SHA224, WC_SHA224_DIGEST_SIZE, key, sizeof(key),
"HMAC-SHA224");
}
@ -2890,7 +2890,7 @@ void bench_hmac_sha256(int doAsync)
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b };
bench_hmac(doAsync, SHA256, SHA256_DIGEST_SIZE, key, sizeof(key),
bench_hmac(doAsync, WC_SHA256, WC_SHA256_DIGEST_SIZE, key, sizeof(key),
"HMAC-SHA256");
}
@ -2907,7 +2907,7 @@ void bench_hmac_sha384(int doAsync)
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b };
bench_hmac(doAsync, SHA384, SHA384_DIGEST_SIZE, key, sizeof(key),
bench_hmac(doAsync, WC_SHA384, WC_SHA384_DIGEST_SIZE, key, sizeof(key),
"HMAC-SHA384");
}
@ -2926,7 +2926,7 @@ void bench_hmac_sha512(int doAsync)
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b };
bench_hmac(doAsync, SHA512, SHA512_DIGEST_SIZE, key, sizeof(key),
bench_hmac(doAsync, WC_SHA512, WC_SHA512_DIGEST_SIZE, key, sizeof(key),
"HMAC-SHA512");
}