summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2022-07-13 13:02:01 +0000
committerCy Schubert <cy@FreeBSD.org>2022-07-13 13:02:01 +0000
commitd57351465531b38689892ec862de2725b52842dd (patch)
tree7363167508f031fdb90b9091c07a065f3903325d /util
parent5f9f82264b91e041df7cba2406625146e7268ce4 (diff)
Diffstat (limited to 'util')
-rw-r--r--util/iana_ports.inc9
-rw-r--r--util/net_help.c10
2 files changed, 15 insertions, 4 deletions
diff --git a/util/iana_ports.inc b/util/iana_ports.inc
index c7662dc62fe3..ae2986c822e5 100644
--- a/util/iana_ports.inc
+++ b/util/iana_ports.inc
@@ -2917,6 +2917,7 @@
3297,
3298,
3299,
+3301,
3302,
3303,
3304,
@@ -4342,6 +4343,13 @@
5859,
5863,
5900,
+5903,
+5904,
+5905,
+5906,
+5907,
+5908,
+5909,
5910,
5911,
5912,
@@ -4553,6 +4561,7 @@
6965,
6966,
6969,
+6980,
6997,
6998,
6999,
diff --git a/util/net_help.c b/util/net_help.c
index 114920e3f905..8153dbdd1818 100644
--- a/util/net_help.c
+++ b/util/net_help.c
@@ -1162,10 +1162,11 @@ add_WIN_cacerts_to_openssl_store(SSL_CTX* tls_ctx)
(const unsigned char **)&pTargetCert->pbCertEncoded,
pTargetCert->cbCertEncoded);
if (!cert1) {
+ unsigned long error = ERR_get_error();
/* return error if a cert fails */
verbose(VERB_ALGO, "%s %d:%s",
"Unable to parse certificate in memory",
- (int)ERR_get_error(), ERR_error_string(ERR_get_error(), NULL));
+ (int)error, ERR_error_string(error, NULL));
return 0;
}
else {
@@ -1176,10 +1177,11 @@ add_WIN_cacerts_to_openssl_store(SSL_CTX* tls_ctx)
/* Ignore error X509_R_CERT_ALREADY_IN_HASH_TABLE which means the
* certificate is already in the store. */
if(ERR_GET_LIB(error) != ERR_LIB_X509 ||
- ERR_GET_REASON(error) != X509_R_CERT_ALREADY_IN_HASH_TABLE) {
+ ERR_GET_REASON(error) != X509_R_CERT_ALREADY_IN_HASH_TABLE) {
+ error = ERR_get_error();
verbose(VERB_ALGO, "%s %d:%s\n",
- "Error adding certificate", (int)ERR_get_error(),
- ERR_error_string(ERR_get_error(), NULL));
+ "Error adding certificate", (int)error,
+ ERR_error_string(error, NULL));
X509_free(cert1);
return 0;
}