summaryrefslogtreecommitdiff
blob: 28fff5733a0a3cdd6b27ad82d51efaaf592c3c90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
http://bugs.gentoo.org/324959

--- src/openssl/dsig-get-attr.c
+++ src/openssl/dsig-get-attr.c
@@ -47,7 +47,11 @@
 			ASN1_TYPE *val = sk_ASN1_TYPE_value(attr->value.set,0);
 
 			if(val->type == V_ASN1_BMPSTRING)
+				#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+				return OPENSSL_uni2asc(val->value.bmpstring->data,
+				#else
 				return uni2asc(val->value.bmpstring->data,
+				#endif
 					       val->value.bmpstring->length);
 
 			if(val->type == V_ASN1_OCTET_STRING)
--- src/openssl/pkcs7_encrypt.c
+++ src/openssl/pkcs7_encrypt.c
@@ -269,6 +269,10 @@
 	char buf[512];
 	EVP_PKEY *elster_pubkey = X509_get_pubkey((X509 *)x509_cert);
 
+	#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+	#define EVP_PKEY_encrypt EVP_PKEY_encrypt_old
+	#endif
+
 	int len = EVP_PKEY_encrypt((unsigned char *) buf,
 				   key, EVP_CIPHER_key_length(cipher),
 				   elster_pubkey);