Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions c_src/exmpp_tls_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
if (ASN1_STRING_type(gen->d.ia5) != V_ASN1_IA5STRING)
continue;

dnsname = (char *)ASN1_STRING_data(gen->d.ia5);
dnsname = (char *)ASN1_STRING_get0_data(gen->d.ia5);

/* ASN1_IA5STRING may contain NUL character; check
* it. */
Expand Down Expand Up @@ -934,11 +934,13 @@ DRIVER_INIT(DRIVER_NAME)
// Initialize ephemeral Diffie-Hellman parameters.
dh1024 = DH_new();
if (dh1024 != NULL) {
dh1024->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
dh1024->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
if (dh1024->p == NULL || dh1024->g == NULL) {
BIGNUM *p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
BIGNUM *g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
if (p == NULL || g == NULL) {
DH_free(dh1024);
dh1024 = NULL;
} else {
DH_set0_pqg(dh1024, p, g, NULL);
}
}
#endif
Expand Down