summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Tsoy <alexander@tsoy.me>2019-05-21 22:29:59 +0300
committerMichał Górny <mgorny@gentoo.org>2019-06-01 10:15:07 +0200
commit8b853a8081e1c2ce0c4966203bdf0f928d782ce3 (patch)
treeffa142e2efb10018b7b361aed62a98751c653783 /x11-misc/x11vnc/files
parentx11-misc/x11vnc: restore ssl USE-flag (diff)
downloadgentoo-8b853a8081e1c2ce0c4966203bdf0f928d782ce3.tar.gz
gentoo-8b853a8081e1c2ce0c4966203bdf0f928d782ce3.tar.bz2
gentoo-8b853a8081e1c2ce0c4966203bdf0f928d782ce3.zip
x11-misc/x11vnc: fix building with libressl
Closes: https://bugs.gentoo.org/675610 Package-Manager: Portage-2.3.62, Repoman-2.3.11 Signed-off-by: Alexander Tsoy <alexander@tsoy.me> Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'x11-misc/x11vnc/files')
-rw-r--r--x11-misc/x11vnc/files/x11vnc-0.9.16-libressl.patch93
1 files changed, 93 insertions, 0 deletions
diff --git a/x11-misc/x11vnc/files/x11vnc-0.9.16-libressl.patch b/x11-misc/x11vnc/files/x11vnc-0.9.16-libressl.patch
new file mode 100644
index 000000000000..8e5d8a692175
--- /dev/null
+++ b/x11-misc/x11vnc/files/x11vnc-0.9.16-libressl.patch
@@ -0,0 +1,93 @@
+diff --git a/src/sslhelper.c b/src/sslhelper.c
+index 04c2e27..fb9daa6 100644
+--- a/src/sslhelper.c
++++ b/src/sslhelper.c
+@@ -803,7 +803,7 @@ static int pem_passwd_callback(char *buf, int size, int rwflag,
+ static int crl_callback(X509_STORE_CTX *callback_ctx) {
+ const ASN1_INTEGER *revoked_serial;
+ X509_STORE_CTX *store_ctx;
+-#if OPENSSL_VERSION_NUMBER > 0x10100000L
++#if OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ X509_OBJECT *obj;
+ #else
+ X509_OBJECT obj;
+@@ -829,7 +829,7 @@ static int crl_callback(X509_STORE_CTX *callback_ctx) {
+ * the current certificate in order to verify it's integrity. */
+ store_ctx = X509_STORE_CTX_new();
+ X509_STORE_CTX_init(store_ctx, revocation_store, NULL, NULL);
+-#if OPENSSL_VERSION_NUMBER > 0x10100000L
++#if OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ obj = X509_OBJECT_new();
+ rc=X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, subject, obj);
+ crl = X509_OBJECT_get0_X509_CRL(obj);
+@@ -865,7 +865,7 @@ static int crl_callback(X509_STORE_CTX *callback_ctx) {
+ rfbLog("Invalid signature on CRL\n");
+ X509_STORE_CTX_set_error(callback_ctx,
+ X509_V_ERR_CRL_SIGNATURE_FAILURE);
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ X509_OBJECT_free(obj);
+ #else
+ X509_OBJECT_free_contents(&obj);
+@@ -883,7 +883,7 @@ static int crl_callback(X509_STORE_CTX *callback_ctx) {
+ rfbLog("Found CRL has invalid nextUpdate field\n");
+ X509_STORE_CTX_set_error(callback_ctx,
+ X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD);
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ X509_OBJECT_free(obj);
+ #else
+ X509_OBJECT_free_contents(&obj);
+@@ -894,14 +894,14 @@ static int crl_callback(X509_STORE_CTX *callback_ctx) {
+ rfbLog("Found CRL is expired - "
+ "revoking all certificates until you get updated CRL\n");
+ X509_STORE_CTX_set_error(callback_ctx, X509_V_ERR_CRL_HAS_EXPIRED);
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ X509_OBJECT_free(obj);
+ #else
+ X509_OBJECT_free_contents(&obj);
+ #endif
+ return 0; /* Reject connection */
+ }
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ X509_OBJECT_free(obj);
+ #else
+ X509_OBJECT_free_contents(&obj);
+@@ -912,7 +912,7 @@ static int crl_callback(X509_STORE_CTX *callback_ctx) {
+ * the current certificate in order to check for revocation. */
+ store_ctx = X509_STORE_CTX_new();
+ X509_STORE_CTX_init(store_ctx, revocation_store, NULL, NULL);
+-#if OPENSSL_VERSION_NUMBER > 0x10100000L
++#if OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ obj = X509_OBJECT_new();
+ rc=X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj);
+ crl = X509_OBJECT_get0_X509_CRL(obj);
+@@ -942,7 +942,7 @@ static int crl_callback(X509_STORE_CTX *callback_ctx) {
+ "revoked per CRL from issuer %s\n", serial, serial, cp);
+ OPENSSL_free(cp);
+ X509_STORE_CTX_set_error(callback_ctx, X509_V_ERR_CERT_REVOKED);
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ X509_OBJECT_free(obj);
+ #else
+ X509_OBJECT_free_contents(&obj);
+@@ -950,7 +950,7 @@ static int crl_callback(X509_STORE_CTX *callback_ctx) {
+ return 0; /* Reject connection */
+ }
+ }
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ X509_OBJECT_free(obj);
+ #else
+ X509_OBJECT_free_contents(&obj);
+@@ -1596,7 +1596,7 @@ static int switch_to_anon_dh(void) {
+ if (ssl_client_mode) {
+ return 1;
+ }
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+ /* Security level must be set to 0 for unauthenticated suites. */
+ SSL_CTX_set_security_level(ctx, 0);
+ #endif