30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
$OpenBSD: patch-x11vnc_enc_h,v 1.2 2015/09/16 10:43:18 sthen Exp $
|
|
|
|
LibreSSL 2.3 gets rid of SHA-0 (EVP_sha).
|
|
|
|
OpenSSL has no targetted way to disable this, thus OPENSSL_NO_SHA0 is
|
|
LibreSSL-only at prsent.
|
|
|
|
--- x11vnc/enc.h.orig Wed Sep 16 04:32:40 2015
|
|
+++ x11vnc/enc.h Wed Sep 16 04:35:00 2015
|
|
@@ -454,8 +454,10 @@ extern void enc_do(char *ciph, char *keyfile, char *lp
|
|
p++;
|
|
if (strstr(p, "md5+") == p) {
|
|
Digest = EVP_md5(); p += strlen("md5+");
|
|
+#ifndef OPENSSL_NO_SHA0
|
|
} else if (strstr(p, "sha+") == p) {
|
|
Digest = EVP_sha(); p += strlen("sha+");
|
|
+#endif
|
|
} else if (strstr(p, "sha1+") == p) {
|
|
Digest = EVP_sha1(); p += strlen("sha1+");
|
|
} else if (strstr(p, "ripe+") == p) {
|
|
@@ -1407,7 +1409,7 @@ static void securevnc_setup(int conn1, int conn2) {
|
|
fprintf(stderr, "securevnc_setup: RAND_pseudo_bytes() rc=%d\n", rc);
|
|
if (getenv("RANDSTR")) {
|
|
char *s = getenv("RANDSTR");
|
|
- fprintf(stderr, "securevnc_setup: seeding with RANDSTR len=%d\n", strlen(s));
|
|
+ fprintf(stderr, "securevnc_setup: seeding with RANDSTR len=%zd\n", strlen(s));
|
|
RAND_add(s, strlen(s), strlen(s));
|
|
}
|
|
}
|