aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-04-20 01:29:54 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-05-05 16:58:14 +0900
commita0b5b4be1dff25759e81b5f5c765556fc4cfa571 (patch)
treece55bf2e8d1d83afec944aa157dda517c9662bf9
parente963a8e1fb64a3a63e89ffea532e39073b57027a (diff)
downloadruby-a0b5b4be1dff25759e81b5f5c765556fc4cfa571.tar.gz
ext/openssl: include openssl/asn1.h instead of openssl/asn1_mac.h
asn1_mac.h is removed in OpenSSL 1.1.0
-rw-r--r--ext/openssl/ossl.h2
-rw-r--r--ext/openssl/ossl_x509ext.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h
index a8e70f09dc..cebbc2a21c 100644
--- a/ext/openssl/ossl.h
+++ b/ext/openssl/ossl.h
@@ -44,7 +44,7 @@
#endif
#include <errno.h>
#include <openssl/err.h>
-#include <openssl/asn1_mac.h>
+#include <openssl/asn1.h>
#include <openssl/x509v3.h>
#include <openssl/ssl.h>
#include <openssl/pkcs12.h>
diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c
index b17cbf9cb5..15e0c1f875 100644
--- a/ext/openssl/ossl_x509ext.c
+++ b/ext/openssl/ossl_x509ext.c
@@ -354,7 +354,7 @@ ossl_x509ext_set_value(VALUE self, VALUE data)
OPENSSL_free(s);
ossl_raise(eX509ExtError, NULL);
}
- if(!M_ASN1_OCTET_STRING_set(asn1s, s, RSTRING_LENINT(data))){
+ if(!ASN1_OCTET_STRING_set(asn1s, (unsigned char *)s, RSTRING_LENINT(data))){
OPENSSL_free(s);
ASN1_OCTET_STRING_free(asn1s);
ossl_raise(eX509ExtError, NULL);
@@ -411,7 +411,7 @@ ossl_x509ext_get_value(VALUE obj)
if (!(out = BIO_new(BIO_s_mem())))
ossl_raise(eX509ExtError, NULL);
if (!X509V3_EXT_print(out, ext, 0, 0))
- M_ASN1_OCTET_STRING_print(out, ext->value);
+ ASN1_STRING_print(out, (ASN1_STRING *)X509_EXTENSION_get_data(ext));
ret = ossl_membio2str(out);
return ret;