Line 0
Link Here
|
|
|
1 |
--- libraries/libldap/tls_o.c.orig 2017-06-04 16:31:28 UTC |
2 |
+++ libraries/libldap/tls_o.c |
3 |
@@ -47,7 +47,7 @@ |
4 |
#include <ssl.h> |
5 |
#endif |
6 |
|
7 |
-#if OPENSSL_VERSION_NUMBER >= 0x10100000 |
8 |
+#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) |
9 |
#define ASN1_STRING_data(x) ASN1_STRING_get0_data(x) |
10 |
#endif |
11 |
|
12 |
@@ -157,7 +157,7 @@ tlso_init( void ) |
13 |
(void) tlso_seed_PRNG( lo->ldo_tls_randfile ); |
14 |
#endif |
15 |
|
16 |
-#if OPENSSL_VERSION_NUMBER < 0x10100000 |
17 |
+#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) |
18 |
SSL_load_error_strings(); |
19 |
SSL_library_init(); |
20 |
OpenSSL_add_all_digests(); |
21 |
@@ -205,7 +205,7 @@ static void |
22 |
tlso_ctx_ref( tls_ctx *ctx ) |
23 |
{ |
24 |
tlso_ctx *c = (tlso_ctx *)ctx; |
25 |
-#if OPENSSL_VERSION_NUMBER < 0x10100000 |
26 |
+#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) |
27 |
#define SSL_CTX_up_ref(ctx) CRYPTO_add( &(ctx->references), 1, CRYPTO_LOCK_SSL_CTX ) |
28 |
#endif |
29 |
SSL_CTX_up_ref( c ); |
30 |
@@ -464,7 +464,7 @@ tlso_session_my_dn( tls_session *sess, struct berval * |
31 |
if (!x) return LDAP_INVALID_CREDENTIALS; |
32 |
|
33 |
xn = X509_get_subject_name(x); |
34 |
-#if OPENSSL_VERSION_NUMBER < 0x10100000 |
35 |
+#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) |
36 |
der_dn->bv_len = i2d_X509_NAME( xn, NULL ); |
37 |
der_dn->bv_val = xn->bytes->data; |
38 |
#else |
39 |
@@ -500,7 +500,7 @@ tlso_session_peer_dn( tls_session *sess, struct berval |
40 |
return LDAP_INVALID_CREDENTIALS; |
41 |
|
42 |
xn = X509_get_subject_name(x); |
43 |
-#if OPENSSL_VERSION_NUMBER < 0x10100000 |
44 |
+#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) |
45 |
der_dn->bv_len = i2d_X509_NAME( xn, NULL ); |
46 |
der_dn->bv_val = xn->bytes->data; |
47 |
#else |
48 |
@@ -721,7 +721,7 @@ struct tls_data { |
49 |
Sockbuf_IO_Desc *sbiod; |
50 |
}; |
51 |
|
52 |
-#if OPENSSL_VERSION_NUMBER < 0x10100000 |
53 |
+#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) |
54 |
#define BIO_set_init(b, x) b->init = x |
55 |
#define BIO_set_data(b, x) b->ptr = x |
56 |
#define BIO_clear_flags(b, x) b->flags &= ~(x) |
57 |
@@ -822,7 +822,7 @@ tlso_bio_puts( BIO *b, const char *str ) |
58 |
return tlso_bio_write( b, str, strlen( str ) ); |
59 |
} |
60 |
|
61 |
-#if OPENSSL_VERSION_NUMBER >= 0x10100000 |
62 |
+#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) |
63 |
struct bio_method_st { |
64 |
int type; |
65 |
const char *name; |
66 |
|
67 |
Zmiany atrybutów dla: files/patch-libressl |
68 |
___________________________________________________________________ |
69 |
Added: fbsd:nokeywords |
70 |
## -0,0 +1 ## |
71 |
+yes |
72 |
\ No newline at end of property |
73 |
Added: svn:eol-style |
74 |
## -0,0 +1 ## |
75 |
+native |
76 |
\ No newline at end of property |
77 |
Added: svn:mime-type |
78 |
## -0,0 +1 ## |
79 |
+text/plain |
80 |
\ No newline at end of property |
81 |
|
82 |
|