View | Details | Raw Unified | Return to bug 214691 | Differences between
and this patch

Collapse All | Expand All

(-)b/net/qt4-network/files/patch-src_network_ssl_qsslcertificate.cpp (+80 lines)
Added Link Here
1
--- src/network/ssl/qsslcertificate.cpp.orig	2015-05-07 16:14:44.000000000 +0200
2
+++ src/network/ssl/qsslcertificate.cpp	2016-11-20 16:02:24.965306656 +0100
3
@@ -260,8 +260,13 @@
4
 {
5
     QMutexLocker lock(QMutexPool::globalInstanceGet(d.data()));
6
     if (d->versionString.isEmpty() && d->x509)
7
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
8
+	d->versionString =
9
+	    QByteArray::number(qlonglong(q_X509_get_version(d->x509)) + 1);
10
+#else
11
         d->versionString =
12
             QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->version)) + 1);
13
+#endif
14
 
15
     return d->versionString;
16
 }
17
@@ -276,7 +281,11 @@
18
 {
19
     QMutexLocker lock(QMutexPool::globalInstanceGet(d.data()));
20
     if (d->serialNumberString.isEmpty() && d->x509) {
21
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
22
+	ASN1_INTEGER *serialNumber = q_X509_get_serialNumber(d->x509);
23
+#else
24
         ASN1_INTEGER *serialNumber = d->x509->cert_info->serialNumber;
25
+#endif
26
         // if we cannot convert to a long, just output the hexadecimal number
27
         if (serialNumber->length > 4) {
28
             QByteArray hexString;
29
@@ -489,19 +498,37 @@
30
     QSslKey key;
31
 
32
     key.d->type = QSsl::PublicKey;
33
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
34
+    EVP_PKEY *pkey = q_X509_get_pubkey(d->x509);
35
+#else
36
     X509_PUBKEY *xkey = d->x509->cert_info->key;
37
     EVP_PKEY *pkey = q_X509_PUBKEY_get(xkey);
38
+#endif
39
     Q_ASSERT(pkey);
40
 
41
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
42
+    int keyType = q_EVP_PKEY_type(q_EVP_PKEY_base_id(pkey));
43
+
44
+    if (keyType == EVP_PKEY_RSA) {
45
+#else
46
     if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_RSA) {
47
+#endif
48
         key.d->rsa = q_EVP_PKEY_get1_RSA(pkey);
49
         key.d->algorithm = QSsl::Rsa;
50
         key.d->isNull = false;
51
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
52
+    } else if (keyType == EVP_PKEY_DSA) {
53
+#else
54
     } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA) {
55
+#endif
56
         key.d->dsa = q_EVP_PKEY_get1_DSA(pkey);
57
         key.d->algorithm = QSsl::Dsa;
58
         key.d->isNull = false;
59
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
60
+    } else if (keyType == EVP_PKEY_DH) {
61
+#else
62
     } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DH) {
63
+#endif
64
         // DH unsupported
65
     } else {
66
         // error?
67
@@ -698,8 +725,13 @@
68
     if (!x509 || !QSslSocket::supportsSsl())
69
         return certificate;
70
 
71
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
72
+    const ASN1_TIME *nbef = q_X509_get0_notBefore(x509);
73
+    const ASN1_TIME *naft = q_X509_get0_notAfter(x509);
74
+#else
75
     ASN1_TIME *nbef = q_X509_get_notBefore(x509);
76
     ASN1_TIME *naft = q_X509_get_notAfter(x509);
77
+#endif
78
     certificate.d->notValidBefore = q_getTimeFromASN1(nbef);
79
     certificate.d->notValidAfter = q_getTimeFromASN1(naft);
80
     certificate.d->null = false;
(-)b/net/qt4-network/files/patch-src_network_ssl_qsslkey.cpp (+16 lines)
Added Link Here
1
--- src/network/ssl/qsslkey.cpp.orig	2015-05-07 16:14:44.000000000 +0200
2
+++ src/network/ssl/qsslkey.cpp	2016-11-20 01:56:53.051067435 +0100
3
@@ -321,8 +321,13 @@
4
 {
5
     if (d->isNull)
6
         return -1;
7
+#if OPENSSL_VERSION_NUMBER >= 0x10100000
8
+    return (d->algorithm == QSsl::Rsa)
9
+	   ? q_RSA_bits(d->rsa) : q_DSA_bits(d->dsa);
10
+#else
11
     return (d->algorithm == QSsl::Rsa)
12
            ? q_BN_num_bits(d->rsa->n) : q_BN_num_bits(d->dsa->p);
13
+#endif
14
 }
15
 
16
 /*!
(-)b/net/qt4-network/files/patch-src_network_ssl_qsslsocket__openssl.cpp (-3 / +52 lines)
Lines 1-6 Link Here
1
--- src/network/ssl/qsslsocket_openssl.cpp.orig	2015-05-07 14:14:44 UTC
1
--- src/network/ssl/qsslsocket_openssl.cpp.orig	2015-05-07 16:14:44.000000000 +0200
2
+++ src/network/ssl/qsslsocket_openssl.cpp
2
+++ src/network/ssl/qsslsocket_openssl.cpp	2016-11-20 14:12:20.918759010 +0100
3
@@ -267,15 +267,14 @@ init_context:
3
@@ -222,8 +222,12 @@
4
             ciph.d->encryptionMethod = descriptionList.at(4).mid(4);
5
         ciph.d->exportable = (descriptionList.size() > 6 && descriptionList.at(6) == QLatin1String("export"));
6
 
7
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
8
         ciph.d->bits = cipher->strength_bits;
9
         ciph.d->supportedBits = cipher->alg_bits;
10
+#else
11
+	ciph.d->bits = q_SSL_CIPHER_get_bits(cipher, &ciph.d->supportedBits);
12
+#endif
13
 
14
     }
15
     return ciph;
16
@@ -260,22 +264,21 @@
17
 init_context:
18
     switch (configuration.protocol) {
19
     case QSsl::SslV2:
20
-#ifndef OPENSSL_NO_SSL2
21
+#if OPENSSL_VERSION_NUMBER <= 0x1010000L && !defined(OPENSSL_NO_SSL2)
22
         ctx = q_SSL_CTX_new(client ? q_SSLv2_client_method() : q_SSLv2_server_method());
23
 #else
24
         ctx = 0; // SSL 2 not supported by the system, but chosen deliberately -> error
4
 #endif
25
 #endif
5
         break;
26
         break;
6
     case QSsl::SslV3:
27
     case QSsl::SslV3:
Lines 19-21 Link Here
19
         ctx = q_SSL_CTX_new(client ? q_TLSv1_client_method() : q_TLSv1_server_method());
40
         ctx = q_SSL_CTX_new(client ? q_TLSv1_client_method() : q_TLSv1_server_method());
20
         break;
41
         break;
21
     }
42
     }
43
@@ -363,7 +366,7 @@
44
         //
45
         // See also: QSslContext::fromConfiguration()
46
         if (caCertificate.expiryDate() >= QDateTime::currentDateTime()) {
47
-            q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle());
48
+            q_X509_STORE_add_cert(q_SSL_CTX_get_cert_store(ctx), (X509 *)caCertificate.handle());
49
         }
50
     }
51
 
52
@@ -659,13 +662,11 @@
53
     STACK_OF(SSL_CIPHER) *supportedCiphers = q_SSL_get_ciphers(mySsl);
54
     for (int i = 0; i < q_sk_SSL_CIPHER_num(supportedCiphers); ++i) {
55
         if (SSL_CIPHER *cipher = q_sk_SSL_CIPHER_value(supportedCiphers, i)) {
56
-            if (cipher->valid) {
57
-                QSslCipher ciph = QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher);
58
-                if (!ciph.isNull()) {
59
-                    if (!ciph.name().toLower().startsWith(QLatin1String("adh")))
60
-                        ciphers << ciph;
61
-                }
62
-            }
63
+	    QSslCipher ciph = QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher);
64
+	    if (!ciph.isNull()) {
65
+	        if (!ciph.name().toLower().startsWith(QLatin1String("adh")))
66
+		    ciphers << ciph;
67
+	    }
68
         }
69
     }
70
 
(-)b/net/qt4-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols.cpp (-4 / +152 lines)
Lines 1-6 Link Here
1
--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig	2015-05-07 14:14:44 UTC
1
--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig	2015-05-07 16:14:44.000000000 +0200
2
+++ src/network/ssl/qsslsocket_openssl_symbols.cpp
2
+++ src/network/ssl/qsslsocket_openssl_symbols.cpp	2016-11-20 15:56:03.945333563 +0100
3
@@ -511,9 +511,9 @@ static QPair<QLibrary*, QLibrary*> loadO
3
@@ -122,6 +122,9 @@
4
 DEFINEFUNC(void, CRYPTO_set_id_callback, unsigned long (*a)(), a, return, DUMMYARG)
5
 DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
6
 DEFINEFUNC(void, DSA_free, DSA *a, a, return, DUMMYARG)
7
+#if  OPENSSL_VERSION_NUMBER >= 0x1010000L
8
+DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return)
9
+#endif
10
 #if  OPENSSL_VERSION_NUMBER < 0x00908000L
11
 DEFINEFUNC3(X509 *, d2i_X509, X509 **a, a, unsigned char **b, b, long c, c, return 0, return)
12
 #else // 0.9.8 broke SC and BC by changing this signature.
13
@@ -130,6 +133,9 @@
14
 DEFINEFUNC2(char *, ERR_error_string, unsigned long a, a, char *b, b, return 0, return)
15
 DEFINEFUNC(unsigned long, ERR_get_error, DUMMYARG, DUMMYARG, return 0, return)
16
 DEFINEFUNC(const EVP_CIPHER *, EVP_des_ede3_cbc, DUMMYARG, DUMMYARG, return 0, return)
17
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
18
+DEFINEFUNC(const EVP_MD *, EVP_sha1, DUMMYARG, DUMMYARG, return 0, return)
19
+#endif
20
 DEFINEFUNC3(int, EVP_PKEY_assign, EVP_PKEY *a, a, int b, b, char *c, c, return -1, return)
21
 DEFINEFUNC2(int, EVP_PKEY_set1_RSA, EVP_PKEY *a, a, RSA *b, b, return -1, return)
22
 DEFINEFUNC2(int, EVP_PKEY_set1_DSA, EVP_PKEY *a, a, DSA *b, b, return -1, return)
23
@@ -138,6 +144,9 @@
24
 DEFINEFUNC(RSA *, EVP_PKEY_get1_RSA, EVP_PKEY *a, a, return 0, return)
25
 DEFINEFUNC(EVP_PKEY *, EVP_PKEY_new, DUMMYARG, DUMMYARG, return 0, return)
26
 DEFINEFUNC(int, EVP_PKEY_type, int a, a, return NID_undef, return)
27
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
28
+DEFINEFUNC(int, EVP_PKEY_base_id, EVP_PKEY *a, a, return NID_undef, return)
29
+#endif
30
 DEFINEFUNC2(int, i2d_X509, X509 *a, a, unsigned char **b, b, return -1, return)
31
 DEFINEFUNC(const char *, OBJ_nid2sn, int a, a, return 0, return)
32
 DEFINEFUNC(int, OBJ_obj2nid, const ASN1_OBJECT *a, a, return NID_undef, return)
33
@@ -156,6 +165,9 @@
34
 DEFINEFUNC2(int, PEM_write_bio_RSA_PUBKEY, BIO *a, a, RSA *b, b, return 0, return)
35
 DEFINEFUNC2(void, RAND_seed, const void *a, a, int b, b, return, DUMMYARG)
36
 DEFINEFUNC(int, RAND_status, void, DUMMYARG, return -1, return)
37
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
38
+DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return)
39
+#endif
40
 DEFINEFUNC(void, RSA_free, RSA *a, a, return, DUMMYARG)
41
 DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
42
 DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
43
@@ -169,6 +181,9 @@
44
 DEFINEFUNC(int, SSL_accept, SSL *a, a, return -1, return)
45
 DEFINEFUNC(int, SSL_clear, SSL *a, a, return -1, return)
46
 DEFINEFUNC3(char *, SSL_CIPHER_description, SSL_CIPHER *a, a, char *b, b, int c, c, return 0, return)
47
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
48
+DEFINEFUNC2(int, SSL_CIPHER_get_bits, SSL_CIPHER *a, a, int *b, b, return 0, return)
49
+#endif
50
 DEFINEFUNC(int, SSL_connect, SSL *a, a, return -1, return)
51
 #if OPENSSL_VERSION_NUMBER >= 0x00908000L
52
 // 0.9.8 broke SC and BC by changing this function's signature.
53
@@ -183,6 +198,9 @@
54
 #else
55
 DEFINEFUNC(SSL_CTX *, SSL_CTX_new, SSL_METHOD *a, a, return 0, return)
56
 #endif
57
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
58
+DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long op, op, return 0, return)
59
+#endif
60
 DEFINEFUNC2(int, SSL_CTX_set_cipher_list, SSL_CTX *a, a, const char *b, b, return -1, return)
61
 DEFINEFUNC(int, SSL_CTX_set_default_verify_paths, SSL_CTX *a, a, return -1, return)
62
 DEFINEFUNC3(void, SSL_CTX_set_verify, SSL_CTX *a, a, int b, b, int (*c)(int, X509_STORE_CTX *), c, return, DUMMYARG)
63
@@ -192,6 +210,7 @@
64
 DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -1, return)
65
 DEFINEFUNC2(int, SSL_CTX_use_RSAPrivateKey, SSL_CTX *a, a, RSA *b, b, return -1, return)
66
 DEFINEFUNC3(int, SSL_CTX_use_PrivateKey_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return)
67
+DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *a, a, return 0, return)
68
 DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
69
 #if OPENSSL_VERSION_NUMBER >= 0x00908000L
70
 // 0.9.8 broke SC and BC by changing this function's signature.
71
@@ -252,6 +271,9 @@
72
 #ifndef SSLEAY_MACROS
73
 DEFINEFUNC(X509 *, X509_dup, X509 *a, a, return 0, return)
74
 #endif
75
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
76
+DEFINEFUNC4(int, X509_digest, const X509 *x509, x509, const EVP_MD *type, type, unsigned char *md, md, unsigned int *len, len, return -1, return)
77
+#endif
78
 DEFINEFUNC(ASN1_OBJECT *, X509_EXTENSION_get_object, X509_EXTENSION *a, a, return 0, return)
79
 DEFINEFUNC(void, X509_free, X509 *a, a, return, DUMMYARG)
80
 DEFINEFUNC2(X509_EXTENSION *, X509_get_ext, X509 *a, a, int b, b, return 0, return)
81
@@ -259,6 +281,13 @@
82
 DEFINEFUNC4(void *, X509_get_ext_d2i, X509 *a, a, int b, b, int *c, c, int *d, d, return 0, return)
83
 DEFINEFUNC(X509_NAME *, X509_get_issuer_name, X509 *a, a, return 0, return)
84
 DEFINEFUNC(X509_NAME *, X509_get_subject_name, X509 *a, a, return 0, return)
85
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
86
+DEFINEFUNC(long, X509_get_version, X509 *a, a, return -1, return)
87
+DEFINEFUNC(ASN1_INTEGER *, X509_get_serialNumber, X509 *a, a, return 0, return)
88
+DEFINEFUNC(EVP_PKEY *, X509_get_pubkey, X509 *a, a, return 0, return)
89
+DEFINEFUNC(const ASN1_TIME *, X509_get0_notBefore, X509 *a, a, return 0, return)
90
+DEFINEFUNC(const ASN1_TIME *, X509_get0_notAfter, X509 *a, a, return 0, return)
91
+#endif
92
 DEFINEFUNC(int, X509_verify_cert, X509_STORE_CTX *a, a, return -1, return)
93
 DEFINEFUNC(int, X509_NAME_entry_count, X509_NAME *a, a, return 0, return)
94
 DEFINEFUNC2(X509_NAME_ENTRY *, X509_NAME_get_entry, X509_NAME *a, a, int b, b, return 0, return)
95
@@ -511,9 +540,9 @@
4
     libcrypto->setLoadHints(libcrypto->loadHints() | QLibrary::ImprovedSearchHeuristics);
96
     libcrypto->setLoadHints(libcrypto->loadHints() | QLibrary::ImprovedSearchHeuristics);
5
 #elif defined(SHLIB_VERSION_NUMBER)
97
 #elif defined(SHLIB_VERSION_NUMBER)
6
     // first attempt: the canonical name is libssl.so.<SHLIB_VERSION_NUMBER>
98
     // first attempt: the canonical name is libssl.so.<SHLIB_VERSION_NUMBER>
Lines 12-18 Link Here
12
     libcrypto->setLoadHints(libcrypto->loadHints() | QLibrary::ImprovedSearchHeuristics);
104
     libcrypto->setLoadHints(libcrypto->loadHints() | QLibrary::ImprovedSearchHeuristics);
13
     if (libcrypto->load() && libssl->load()) {
105
     if (libcrypto->load() && libssl->load()) {
14
         // libssl.so.<SHLIB_VERSION_NUMBER> and libcrypto.so.<SHLIB_VERSION_NUMBER> found
106
         // libssl.so.<SHLIB_VERSION_NUMBER> and libcrypto.so.<SHLIB_VERSION_NUMBER> found
15
@@ -525,8 +525,8 @@ static QPair<QLibrary*, QLibrary*> loadO
107
@@ -525,8 +554,8 @@
16
 #endif
108
 #endif
17
 
109
 
18
     // second attempt: find the development files libssl.so and libcrypto.so
110
     // second attempt: find the development files libssl.so and libcrypto.so
Lines 23-25 Link Here
23
     if (libcrypto->load() && libssl->load()) {
115
     if (libcrypto->load() && libssl->load()) {
24
         // libssl.so.0 and libcrypto.so.0 found
116
         // libssl.so.0 and libcrypto.so.0 found
25
         return pair;
117
         return pair;
118
@@ -618,9 +647,15 @@
119
     RESOLVEFUNC(CRYPTO_set_id_callback, 513, libs.second )
120
     RESOLVEFUNC(CRYPTO_set_locking_callback, 516, libs.second )
121
     RESOLVEFUNC(DSA_free, 594, libs.second )
122
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
123
+    RESOLVEFUNC(DSA_bits, 695, libs.second )
124
+#endif
125
     RESOLVEFUNC(ERR_error_string, 744, libs.second )
126
     RESOLVEFUNC(ERR_get_error, 749, libs.second )
127
     RESOLVEFUNC(EVP_des_ede3_cbc, 919, libs.second )
128
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
129
+    RESOLVEFUNC(EVP_sha1, 920, libs.second )
130
+#endif
131
     RESOLVEFUNC(EVP_PKEY_assign, 859, libs.second )
132
     RESOLVEFUNC(EVP_PKEY_set1_RSA, 880, libs.second )
133
     RESOLVEFUNC(EVP_PKEY_set1_DSA, 879, libs.second )
134
@@ -646,11 +681,17 @@
135
     RESOLVEFUNC(RAND_seed, 1426, libs.second )
136
     RESOLVEFUNC(RAND_status, 1429, libs.second )
137
     RESOLVEFUNC(RSA_free, 1450, libs.second )
138
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
139
+    RESOLVEFUNC(RSA_bits, 1451, libs.second )
140
+#endif
141
     RESOLVEFUNC(sk_free, 2571, libs.second )
142
     RESOLVEFUNC(sk_num, 2576, libs.second )
143
     RESOLVEFUNC(sk_pop_free, 2578, libs.second )    
144
     RESOLVEFUNC(sk_value, 2585, libs.second )
145
     RESOLVEFUNC(SSL_CIPHER_description, 11, libs.first )
146
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
147
+    RESOLVEFUNC(SSL_CIPHER_get_bits, 12, libs.first )
148
+#endif
149
     RESOLVEFUNC(SSL_CTX_check_private_key, 21, libs.first )
150
     RESOLVEFUNC(SSL_CTX_ctrl, 22, libs.first )
151
     RESOLVEFUNC(SSL_CTX_free, 24, libs.first )
152
@@ -664,6 +705,7 @@
153
     RESOLVEFUNC(SSL_CTX_use_PrivateKey, 58, libs.first )
154
     RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey, 61, libs.first )
155
     RESOLVEFUNC(SSL_CTX_use_PrivateKey_file, 60, libs.first )
156
+    RESOLVEFUNC(SSL_CTX_get_cert_store, 62, libs.first )
157
     RESOLVEFUNC(SSL_accept, 82, libs.first )
158
     RESOLVEFUNC(SSL_clear, 92, libs.first )
159
     RESOLVEFUNC(SSL_connect, 93, libs.first )
160
@@ -718,6 +760,13 @@
161
     RESOLVEFUNC(X509_get_ext_d2i, 2017, libs.second )
162
     RESOLVEFUNC(X509_get_issuer_name, 2018, libs.second )
163
     RESOLVEFUNC(X509_get_subject_name, 2022, libs.second )
164
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
165
+    RESOLVEFUNC(X509_get_version, 2023, libs.second )
166
+    RESOLVEFUNC(X509_get_serialNumber, 2024, libs.second )
167
+    RESOLVEFUNC(X509_get_pubkey, 2025, libs.second )
168
+    RESOLVEFUNC(X509_get0_notBefore, 2026, libs.second )
169
+    RESOLVEFUNC(X509_get0_notAfter, 2027, libs.second )
170
+#endif
171
     RESOLVEFUNC(X509_verify_cert, 2069, libs.second )
172
     RESOLVEFUNC(d2i_X509, 2309, libs.second )
173
     RESOLVEFUNC(i2d_X509, 2489, libs.second )
(-)b/net/qt4-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols__p.h (+95 lines)
Added Link Here
1
--- src/network/ssl/qsslsocket_openssl_symbols_p.h.orig	2015-05-07 16:14:44.000000000 +0200
2
+++ src/network/ssl/qsslsocket_openssl_symbols_p.h	2016-11-20 15:56:29.239328552 +0100
3
@@ -218,6 +218,9 @@
4
 void q_CRYPTO_set_id_callback(unsigned long (*a)());
5
 void q_CRYPTO_free(void *a);
6
 void q_DSA_free(DSA *a);
7
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
8
+int q_DSA_bits(DSA *a);
9
+#endif
10
 #if OPENSSL_VERSION_NUMBER >= 0x00908000L
11
 // 0.9.8 broke SC and BC by changing this function's signature.
12
 X509 *q_d2i_X509(X509 **a, const unsigned char **b, long c);
13
@@ -227,12 +230,18 @@
14
 char *q_ERR_error_string(unsigned long a, char *b);
15
 unsigned long q_ERR_get_error();
16
 const EVP_CIPHER *q_EVP_des_ede3_cbc();
17
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
18
+const EVP_MD *q_EVP_sha1();
19
+#endif
20
 int q_EVP_PKEY_assign(EVP_PKEY *a, int b, char *c);
21
 int q_EVP_PKEY_set1_RSA(EVP_PKEY *a, RSA *b);
22
 int q_EVP_PKEY_set1_DSA(EVP_PKEY *a, DSA *b);
23
 void q_EVP_PKEY_free(EVP_PKEY *a);
24
 RSA *q_EVP_PKEY_get1_RSA(EVP_PKEY *a);
25
 DSA *q_EVP_PKEY_get1_DSA(EVP_PKEY *a);
26
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
27
+int q_EVP_PKEY_base_id(EVP_PKEY *a);
28
+#endif
29
 int q_EVP_PKEY_type(int a);
30
 EVP_PKEY *q_EVP_PKEY_new();
31
 int q_i2d_X509(X509 *a, unsigned char **b);
32
@@ -258,6 +267,9 @@
33
 void q_RAND_seed(const void *a, int b);
34
 int q_RAND_status();
35
 void q_RSA_free(RSA *a);
36
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
37
+int q_RSA_bits(RSA *a);
38
+#endif
39
 int q_sk_num(STACK *a);
40
 void q_sk_pop_free(STACK *a, void (*b)(void *));
41
 #if OPENSSL_VERSION_NUMBER >= 0x10000000L
42
@@ -270,6 +282,9 @@
43
 int q_SSL_accept(SSL *a);
44
 int q_SSL_clear(SSL *a);
45
 char *q_SSL_CIPHER_description(SSL_CIPHER *a, char *b, int c);
46
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
47
+int q_SSL_CIPHER_get_bits(SSL_CIPHER *a, int *b);
48
+#endif
49
 int q_SSL_connect(SSL *a);
50
 #if OPENSSL_VERSION_NUMBER >= 0x00908000L
51
 // 0.9.8 broke SC and BC by changing this function's signature.
52
@@ -293,6 +308,7 @@
53
 int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
54
 int q_SSL_CTX_use_RSAPrivateKey(SSL_CTX *a, RSA *b);
55
 int q_SSL_CTX_use_PrivateKey_file(SSL_CTX *a, const char *b, int c);
56
+X509_STORE *q_SSL_CTX_get_cert_store(const SSL_CTX *a);
57
 void q_SSL_free(SSL *a);
58
 #if OPENSSL_VERSION_NUMBER >= 0x00908000L
59
 // 0.9.8 broke SC and BC by changing this function's signature.
60
@@ -353,6 +369,9 @@
61
 #else
62
 X509 *q_X509_dup(X509 *a);
63
 #endif
64
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
65
+int q_X509_digest(const X509 *x509, const EVP_MD *type, unsigned char *md, unsigned int *len);
66
+#endif
67
 ASN1_OBJECT *q_X509_EXTENSION_get_object(X509_EXTENSION *a);
68
 void q_X509_free(X509 *a);
69
 X509_EXTENSION *q_X509_get_ext(X509 *a, int b);
70
@@ -360,6 +379,13 @@
71
 void *q_X509_get_ext_d2i(X509 *a, int b, int *c, int *d);
72
 X509_NAME *q_X509_get_issuer_name(X509 *a);
73
 X509_NAME *q_X509_get_subject_name(X509 *a);
74
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
75
+long q_X509_get_version(X509 *a);
76
+ASN1_INTEGER *q_X509_get_serialNumber(X509 *a);
77
+EVP_PKEY *q_X509_get_pubkey(X509 *a);
78
+const ASN1_TIME *q_X509_get0_notBefore(X509 *a);
79
+const ASN1_TIME *q_X509_get0_notAfter(X509 *a);
80
+#endif
81
 int q_X509_verify_cert(X509_STORE_CTX *ctx);
82
 int q_X509_NAME_entry_count(X509_NAME *a);
83
 X509_NAME_ENTRY *q_X509_NAME_get_entry(X509_NAME *a,int b);
84
@@ -399,7 +425,11 @@
85
 		PEM_ASN1_write_bio((int (*)(void*, unsigned char**))q_i2d_DSAPrivateKey,PEM_STRING_DSA,\
86
 			bp,(char *)x,enc,kstr,klen,cb,u)
87
 #endif
88
+#if OPENSSL_VERSION_NUMBER <= 0x10100000L
89
 #define q_SSL_CTX_set_options(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
90
+#else
91
+unsigned long q_SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op);
92
+#endif
93
 #define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
94
 #define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)
95
 #define q_sk_GENERAL_NAME_num(st) q_SKM_sk_num(GENERAL_NAME, (st))

Return to bug 214691