99
1010env :
1111 NSPR_VERSION : NSPR_4_36_BRANCH
12+ NSS_VERSION : NSS_3_112_RTM
1213 WOLFSSL_VERSION : v5.8.0-stable
1314 # NSS_DEBUG_PKCS11_MODULE: wolfPKCS11
1415 # NSPR_LOG_MODULES: all:5
@@ -65,27 +66,49 @@ jobs:
6566 if : steps.cache-nspr.outputs.cache-hit != 'true'
6667 run : hg clone https://hg.mozilla.org/projects/nspr -r ${{ env.NSPR_VERSION }}
6768
68- - name : Cache NSS source
69+ - name : Cache NSS source and patches
6970 id : cache-nss-source
7071 uses : actions/cache@v4
7172 with :
72- path : nss
73+ path : |
74+ nss
75+ osp
7376 key : nss-source-fork
7477
75- - name : Clone NSS
78+ - name : Clone NSS and apply wolfSSL patches
7679 if : steps.cache-nss-source.outputs.cache-hit != 'true'
77- uses : actions/checkout@v4
78- with :
79- repository : LinuxJedi/nss
80- ref : nss-tests
81- path : nss
80+ run : |
81+ # Clone official Mozilla NSS with specific tag
82+ hg clone https://hg.mozilla.org/projects/nss -r ${{ env.NSS_VERSION }}
83+
84+ # Clone wolfSSL OSP repository for patches
85+ git clone https://github.com/wolfSSL/osp.git
86+
87+ cd nss
88+
89+ # Apply patches from wolfSSL/osp/nss directory
90+ echo "Applying wolfSSL NSS patches..."
91+ if [ -d "../osp/nss" ]; then
92+ for patch in ../osp/nss/*.patch; do
93+ if [ -f "$patch" ]; then
94+ echo "Applying patch: $(basename $patch)"
95+ patch -p1 < "$patch" || {
96+ echo "Warning: Patch $(basename $patch) failed to apply cleanly"
97+ echo "Attempting to apply with --reject-file option..."
98+ patch -p1 --reject-file=/tmp/$(basename $patch).rej < "$patch" || true
99+ }
100+ fi
101+ done
102+ else
103+ echo "No patches found in wolfSSL/osp/nss directory"
104+ fi
82105
83106 - name : Cache NSS build
84107 id : cache-nss-build
85108 uses : actions/cache@v4
86109 with :
87110 path : dist
88- key : nss-build- fork
111+ key : nss-fork-${{ env.NSS_VERSION }}-latest
89112
90113 - name : Build NSS
91114 if : steps.cache-nss-build.outputs.cache-hit != 'true'
@@ -138,4 +161,3 @@ jobs:
138161 - name : Run NSS tests
139162 working-directory : nss/tests
140163 run : LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib ./all.sh
141-
0 commit comments