{
dane_mtype_list m;
unsigned char mdbuf[EVP_MAX_MD_SIZE];
- unsigned char *buf;
+ unsigned char *buf = NULL;
unsigned char *buf2;
- unsigned int len;
+ unsigned int len = 0;
/*
* Extract ASN.1 DER form of certificate or public key.
matched = match(dane->selectors[SSL_DANE_USAGE_FIXED_LEAF], cert, 0);
if(matched > 0)
if(!ctx->chain)
+ {
if( (ctx->chain = sk_X509_new_null())
&& sk_X509_push(ctx->chain, cert))
CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509);
DANEerr(DANE_F_CHECK_END_ENTITY, ERR_R_MALLOC_FAILURE);
return -1;
}
+ }
return matched;
}
* Sub-domain match: certid is any sub-domain of hostname.
*/
if(match_subdomain)
+ {
if( (idlen = strlen(certid)) > (domlen = strlen(domain)) + 1
&& certid[idlen - domlen - 1] == '.'
&& !strcasecmp(certid + (idlen - domlen), domain))
return 1;
else
continue;
+ }
/*
* Exact match and initial "*" match. The initial "*" in a certid