Module: kamailio
Branch: 4.4
Commit: b29217e8036ead0d09c52616000d6b68d4512f86
URL:
https://github.com/kamailio/kamailio/commit/b29217e8036ead0d09c52616000d6b6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2016-10-27T16:34:39+02:00
auth_identity: still use ASN1_STRING_data() for libssl < v1.1.0
- from libssl v1.1.0, ASN1_STRING_data() is deprecated, but before it
doesn't exist
- reported by Victor Seva, GH #685
(cherry picked from commit 8a46f415fb13b76fa3b071eecd7dc0401f99759e)
---
Modified: modules/auth_identity/auth_crypt.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b29217e8036ead0d09c52616000d6b6…
Patch:
https://github.com/kamailio/kamailio/commit/b29217e8036ead0d09c52616000d6b6…
---
diff --git a/modules/auth_identity/auth_crypt.c b/modules/auth_identity/auth_crypt.c
index dbb0957..f9b40e6 100644
--- a/modules/auth_identity/auth_crypt.c
+++ b/modules/auth_identity/auth_crypt.c
@@ -116,7 +116,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;