mirror of https://github.com/wolfSSL/wolfssl
fix clang build warnings and change return type
This commit is contained in:
parent
db3badb73a
commit
ad6cc6be2e
|
@ -7636,7 +7636,7 @@ int CopyDecodedToX509(WOLFSSL_X509* x509, DecodedCert* dCert)
|
|||
while (cur != NULL) {
|
||||
if (cur->type == ASN_RFC822_TYPE) {
|
||||
DNS_entry* dnsEntry;
|
||||
int strLen = XSTRLEN(cur->name);
|
||||
int strLen = (int)XSTRLEN(cur->name);
|
||||
|
||||
dnsEntry = (DNS_entry*)XMALLOC(sizeof(DNS_entry), x509->heap,
|
||||
DYNAMIC_TYPE_ALTNAME);
|
||||
|
|
|
@ -7284,7 +7284,7 @@ void* wolfSSL_X509_get_ext_d2i(const WOLFSSL_X509* x509,
|
|||
|
||||
/* set app derefrenced pointers */
|
||||
obj->d.ia5_internal.data = dns->name;
|
||||
obj->d.ia5_internal.length = XSTRLEN(dns->name);
|
||||
obj->d.ia5_internal.length = (int)XSTRLEN(dns->name);
|
||||
dns = dns->next;
|
||||
/* last dns in list add at end of function */
|
||||
if (dns != NULL) {
|
||||
|
@ -15057,12 +15057,12 @@ static void ExternalFreeX509(WOLFSSL_X509* x509)
|
|||
}
|
||||
|
||||
|
||||
char* wolfSSL_ASN1_STRING_data(WOLFSSL_ASN1_STRING* asn)
|
||||
unsigned char* wolfSSL_ASN1_STRING_data(WOLFSSL_ASN1_STRING* asn)
|
||||
{
|
||||
WOLFSSL_ENTER("wolfSSL_ASN1_STRING_data");
|
||||
|
||||
if (asn) {
|
||||
return asn->data;
|
||||
return (unsigned char*)asn->data;
|
||||
}
|
||||
else {
|
||||
return NULL;
|
||||
|
|
|
@ -15833,7 +15833,7 @@ static void test_wolfSSL_sk_GENERAL_NAME(void)
|
|||
printf(testingFmt, "wolfSSL_sk_GENERAL_NAME()");
|
||||
|
||||
AssertNotNull(f = XFOPEN(cliCertDerFile, "rb"));
|
||||
AssertIntGT((bytes = XFREAD(buf, 1, sizeof(buf), f)), 0);
|
||||
AssertIntGT((bytes = (int)XFREAD(buf, 1, sizeof(buf), f)), 0);
|
||||
XFCLOSE(f);
|
||||
|
||||
bufPt = buf;
|
||||
|
|
|
@ -148,6 +148,8 @@ typedef WOLFSSL_X509_STORE_CTX X509_STORE_CTX;
|
|||
#define TLSv1_2_server_method wolfTLSv1_2_server_method
|
||||
#define TLSv1_2_client_method wolfTLSv1_2_client_method
|
||||
|
||||
#define X509_FILETYPE_ASN1 SSL_FILETYPE_ASN1
|
||||
|
||||
#ifdef WOLFSSL_DTLS
|
||||
#define DTLSv1_client_method wolfDTLSv1_client_method
|
||||
#define DTLSv1_server_method wolfDTLSv1_server_method
|
||||
|
@ -718,7 +720,6 @@ enum {
|
|||
#define SSL23_ST_SR_CLNT_HELLO_A (0x210|0x2000)
|
||||
#define SSL3_ST_SR_CLNT_HELLO_A (0x110|0x2000)
|
||||
#define ASN1_STRFLGS_ESC_MSB 4
|
||||
#define X509_V_ERR_CERT_REJECTED 28
|
||||
|
||||
#define SSL_MAX_MASTER_KEY_LENGTH WOLFSSL_MAX_MASTER_KEY_LENGTH
|
||||
|
||||
|
|
|
@ -867,7 +867,7 @@ WOLFSSL_API WOLFSSL_ASN1_STRING* wolfSSL_ASN1_STRING_type_new(int type);
|
|||
WOLFSSL_API void wolfSSL_ASN1_STRING_free(WOLFSSL_ASN1_STRING* asn1);
|
||||
WOLFSSL_API int wolfSSL_ASN1_STRING_set(WOLFSSL_ASN1_STRING* asn1,
|
||||
const void* data, int dataSz);
|
||||
WOLFSSL_API char* wolfSSL_ASN1_STRING_data(WOLFSSL_ASN1_STRING*);
|
||||
WOLFSSL_API unsigned char* wolfSSL_ASN1_STRING_data(WOLFSSL_ASN1_STRING*);
|
||||
WOLFSSL_API int wolfSSL_ASN1_STRING_length(WOLFSSL_ASN1_STRING*);
|
||||
WOLFSSL_API int wolfSSL_X509_verify_cert(WOLFSSL_X509_STORE_CTX*);
|
||||
WOLFSSL_API const char* wolfSSL_X509_verify_cert_error_string(long);
|
||||
|
@ -1172,6 +1172,8 @@ enum {
|
|||
X509_V_ERR_NO_EXPLICIT_POLICY,
|
||||
X509_V_ERR_UNNESTED_RESOURCE,
|
||||
|
||||
X509_R_CERT_ALREADY_IN_HASH_TABLE,
|
||||
|
||||
XN_FLAG_SPC_EQ = (1 << 23),
|
||||
XN_FLAG_ONELINE = 0,
|
||||
XN_FLAG_RFC2253 = 1,
|
||||
|
|
Loading…
Reference in New Issue