Skip to content

Commit

Permalink
auth_identity: still use ASN1_STRING_data() for libssl < v1.1.0
Browse files Browse the repository at this point in the history
- from libssl v1.1.0, ASN1_STRING_data() is deprecated, but before it
  doesn't exist
- reported by Victor Seva, GH #685
  • Loading branch information
miconda committed Sep 15, 2016
1 parent 5419e8b commit 8a46f41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/auth_identity/auth_crypt.c
Expand Up @@ -114,7 +114,11 @@ int check_x509_subj(X509 *pcert, str* sdom)

if (actname->type == GEN_DNS || actname->type == GEN_URI) {
/* we've found one */
#if OPENSSL_VERSION_NUMBER >= 0x010100000L
altptr = (char *)ASN1_STRING_get0_data(actname->d.ia5);
#else
altptr = (char *)ASN1_STRING_data(actname->d.ia5);
#endif
if (actname->type == GEN_URI) {
if (parse_uri(altptr, strlen(altptr), &suri) != 0) {
continue;
Expand Down

0 comments on commit 8a46f41

Please sign in to comment.