From 57b1732864ea3f6f56b0f856c6255493d3a174be Mon Sep 17 00:00:00 2001
From: SilvanScherrer <silvan.scherrer@aroa.ch>
Date: Fri, 12 Mar 2021 15:18:21 +0100
Subject: [PATCH 4/6] fix some /etc vs /@unixroot/etc path

---
 acinclude.m4   | 2 ++
 lib/vtls/nss.c | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/acinclude.m4 b/acinclude.m4
index c65e1ab62..238cac4ba 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2159,6 +2159,7 @@ dnl /usr/share/ssl/certs/ca-bundle.crt old(er) Redhat
 dnl /usr/local/share/certs/ca-root-nss.crt FreeBSD
 dnl /etc/ssl/cert.pem OpenBSD, FreeBSD (symlink)
 dnl /etc/ssl/certs/ (ca path) SUSE
+dnl /@unixroot/etc/pki/tls/certs/ca-bundle.crt OS/2
 
 AC_DEFUN([CURL_CHECK_CA_BUNDLE], [
 
@@ -2230,6 +2231,7 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
 
         for a in /etc/ssl/certs/ca-certificates.crt \
                  /etc/pki/tls/certs/ca-bundle.crt \
+                 /@unixroot/etc/pki/tls/certs/ca-bundle.crt \
                  /usr/share/ssl/certs/ca-bundle.crt \
                  /usr/local/share/certs/ca-root-nss.crt \
                  /etc/ssl/cert.pem \
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index e5ab71cdf..e4e8d8376 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -74,7 +74,11 @@
 #include "curl_memory.h"
 #include "memdebug.h"
 
+#ifndef __OS2__
 #define SSL_DIR "/etc/pki/nssdb"
+#else
+#define SSL_DIR "/@unixroot/etc/pki/nssdb"
+#endif
 
 /* enough to fit the string "PEM Token #[0|1]" */
 #define SLOTSIZE 13
-- 
2.30.2

