aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorNeel Chauhan <nc@FreeBSD.org>2022-09-01 21:52:28 +0000
committerNeel Chauhan <nc@FreeBSD.org>2022-09-01 21:52:28 +0000
commitde17add7e61938a2a4dd4052f10a6209a08aedda (patch)
tree19937eb4e886fc41e22c41d777d813640263e23b /www
parent346e5d3525579d98427b8e7c8365596a82bd871d (diff)
downloadports-de17add7e61938a2a4dd4052f10a6209a08aedda.tar.gz
ports-de17add7e61938a2a4dd4052f10a6209a08aedda.zip
www/hiawatha: Add missing patches to fix build
Diffstat (limited to 'www')
-rw-r--r--www/hiawatha/files/patch-src_tls.c25
-rw-r--r--www/hiawatha/files/patch-src_wigwam.c23
-rw-r--r--www/hiawatha/files/patch-src_xslt.c12
3 files changed, 60 insertions, 0 deletions
diff --git a/www/hiawatha/files/patch-src_tls.c b/www/hiawatha/files/patch-src_tls.c
new file mode 100644
index 000000000000..e7723e37d069
--- /dev/null
+++ b/www/hiawatha/files/patch-src_tls.c
@@ -0,0 +1,25 @@
+--- src/tls.c.orig 2022-01-22 12:16:26 UTC
++++ src/tls.c
+@@ -322,7 +322,7 @@ int tls_load_key_cert(char *file, mbedtls_pk_context *
+ }
+ mbedtls_pk_init(*private_key);
+
+- if ((result = mbedtls_pk_parse_keyfile(*private_key, file, NULL, mbedtls_psa_get_random, MBEDTLS_PSA_RANDOM_STATE)) != 0) {
++ if ((result = mbedtls_pk_parse_keyfile(*private_key, file, NULL)) != 0) {
+ print_tls_error(result, "Error loading private key from %s", file);
+ return -1;
+ }
+@@ -436,11 +436,13 @@ int tls_accept(int *sock, mbedtls_ssl_context *context
+
+ result = TLS_HANDSHAKE_OKE;
+ while ((handshake = mbedtls_ssl_handshake(context)) != 0) {
++#ifndef __FreeBSD__
+ if (handshake == MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE) {
+ mbedtls_ssl_free(context);
+ result = TLS_HANDSHAKE_NO_MATCH;
+ break;
+ }
++#endif
+
+ if ((handshake != MBEDTLS_ERR_SSL_WANT_READ) && (handshake != MBEDTLS_ERR_SSL_WANT_WRITE)) {
+ mbedtls_ssl_free(context);
diff --git a/www/hiawatha/files/patch-src_wigwam.c b/www/hiawatha/files/patch-src_wigwam.c
new file mode 100644
index 000000000000..47266fdadfa9
--- /dev/null
+++ b/www/hiawatha/files/patch-src_wigwam.c
@@ -0,0 +1,23 @@
+--- src/wigwam.c.orig 2022-08-31 17:25:16 UTC
++++ src/wigwam.c
+@@ -582,7 +582,7 @@ int check_main_config(char *config_dir) {
+ /* Private key check
+ */
+ mbedtls_pk_init(&private_key);
+- if (mbedtls_pk_parse_keyfile(&private_key, needle->value, NULL, mbedtls_psa_get_random, MBEDTLS_PSA_RANDOM_STATE) != 0) {
++ if (mbedtls_pk_parse_keyfile(&private_key, needle->value, NULL) != 0) {
+ printf("Error loading private key from %s.\n", needle->value);
+ errors++;
+ goto next_crt;
+@@ -601,9 +601,11 @@ int check_main_config(char *config_dir) {
+ goto next_crt;
+ }
+
++#ifndef __FreeBSD__
+ if (certificate.MBEDTLS_PRIVATE(sig_md) < MBEDTLS_MD_SHA256) {
+ printf("Warning: the certificate signature algoritm in %s should at least be SHA256.\n", needle->value);
+ }
++#endif
+
+ next_crt:
+ last_file = needle->value;
diff --git a/www/hiawatha/files/patch-src_xslt.c b/www/hiawatha/files/patch-src_xslt.c
new file mode 100644
index 000000000000..349b8aa8e3e1
--- /dev/null
+++ b/www/hiawatha/files/patch-src_xslt.c
@@ -0,0 +1,12 @@
+--- src/xslt.c.orig 2019-02-18 18:34:36 UTC
++++ src/xslt.c
+@@ -277,7 +277,9 @@ void init_xslt_module() {
+ /* XSLT transform functions
+ */
+ void init_xslt_module() {
++#ifndef __FreeBSD__
+ xmlInitMemory();
++#endif
+ xmlInitParser();
+ }
+