Skip to content

Commit 38bed75

Browse files
authored
Merge pull request #135 from LinuxJedi/release_prep
2.0 Release prep
2 parents 9fe950c + da37c3e commit 38bed75

File tree

8 files changed

+181
-24
lines changed

8 files changed

+181
-24
lines changed

.github/workflows/nss-ssltap-test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,37 @@ jobs:
125125
path: /tmp/src/dist
126126
key: nss-build-${{ env.NSS_VERSION }}-latest
127127

128+
- name: Clone NSS and apply wolfSSL patches
129+
if: steps.cache-nss-source.outputs.cache-hit != 'true'
130+
run: |
131+
mkdir -p /tmp/src
132+
cd /tmp/src
133+
134+
# Clone official Mozilla NSS with specific tag
135+
hg clone https://hg.mozilla.org/projects/nss -r ${{ env.NSS_VERSION }}
136+
137+
# Clone wolfSSL OSP repository for patches
138+
git clone https://github.com/wolfSSL/osp.git
139+
140+
cd nss
141+
142+
# Apply patches from wolfSSL/osp/nss directory
143+
echo "Applying wolfSSL NSS patches..."
144+
if [ -d "../osp/nss" ]; then
145+
for patch in ../osp/nss/*.patch; do
146+
if [ -f "$patch" ]; then
147+
echo "Applying patch: $(basename $patch)"
148+
patch -p1 < "$patch" || {
149+
echo "Warning: Patch $(basename $patch) failed to apply cleanly"
150+
echo "Attempting to apply with --reject-file option..."
151+
patch -p1 --reject-file=/tmp/$(basename $patch).rej < "$patch" || true
152+
}
153+
fi
154+
done
155+
else
156+
echo "No patches found in wolfSSL/osp/nss directory"
157+
fi
158+
128159
- name: Build NSS
129160
if: steps.cache-nss-build.outputs.cache-hit != 'true'
130161
run: |

.github/workflows/nss.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
env:
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-

Docker/firefox/Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,13 @@ RUN ./configure --enable-all --enable-aescfb --enable-cryptocb --enable-rsapss -
7171
RUN make && make install
7272
WORKDIR /
7373

74-
# Clone and prepare patch for NSS
75-
RUN git clone https://github.com/LinuxJedi/nss.git
76-
WORKDIR /nss
77-
RUN git diff origin/master origin/wolfPKCS11 > /nss.patch
78-
WORKDIR /
74+
# Clone osp to get the NSS patch
75+
RUN git clone https://github.com/wolfSSL/osp
7976

8077
WORKDIR /firefox
8178
RUN git checkout $FIREFOX_TAG
8279
WORKDIR /firefox/security/nss
83-
RUN patch -p1 < /nss.patch
80+
RUN patch -p1 < /osp/nss/nss-tests-2025-04-11-978205bd37c33d862a5798d8158df7091412d3a7.patch
8481
RUN touch /mozconfig
8582
# Enable ASan specific code and build workarounds
8683
#RUN echo ac_add_options --enable-address-sanitizer >> /firefox/mozconfig

README.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,113 @@ Set to any value to stop storage of token data.
108108

109109
## Release Notes
110110

111+
### wolfPKCS11 Release 2.0 (August 26, 2025)
112+
113+
**Summary**
114+
115+
This release contains many new features so that it can be the PKCS11 backend for NSS. It also includes many bug fixes.
116+
117+
**Detail**
118+
119+
* New examples added
120+
* Added certificate storage for wolfPKCS11
121+
* Added new AES algorithms:
122+
- `AES-CCM`
123+
- `AES-ECB`
124+
- `AES-CTS`
125+
- `AES-CTR`
126+
* Compiler fixes
127+
* Large improvements to TPM storage
128+
* Reduced memory usage for objects
129+
* Added support for MAXQ1065
130+
* Fixed RSA with no public exponent provided
131+
* Fixed `CKA_CERTIFICATE_TYPE` search for `CKC_X_509`
132+
* Fixed RSA with no modulus provided
133+
* Fixed bad memory access with `C_FindObjects` on a certificate object
134+
* Added new functionality:
135+
- `C_Digest*`
136+
- `C_SignEncryptUpdate`
137+
- `C_DecryptVerifyUpdate`
138+
- `C_GetOperationState` and `C_SetOperationState` (Digest only)
139+
- `C_SignRecoverInit` and `C_VerifyRecover`
140+
- `wolfPKCS11_Debugging_On` and `wolfPKCS11_Debugging_Off`
141+
* Added new mechanisms:
142+
- `CKM_ECDSA_SHA*`
143+
- `CKM_SHA*_RSA*`
144+
- `CKM_AES_CMAC_GENERAL`
145+
- `CKM_AES_CMAC`
146+
- `CKM_AES_CBC_ENCRYPT_DATA`
147+
- `CKM_HKDF_DATA`
148+
- `CKM_HKDF_KEY_GEN`
149+
- `CKM_TLS12_KEY_AND_MAC_DERIVE`
150+
- `CKM_TLS12_MASTER_KEY_DERIVE`
151+
- `CKM_TLS12_MASTER_KEY_DERIVE_DH`
152+
- `CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE` (NSS builds only)
153+
- `CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH` (NSS builds only)
154+
- `CKM_NSS_TLS_PRF_GENERAL_SHA256` (NSS builds only)
155+
- `CKM_TLS_MAC`
156+
- `CKM_SHA1_RSA_PKCS`
157+
- `CKM_SHA1_RSA_PKCS_PSS`
158+
- `CKM_SHA3*`
159+
- `CKM_MD5`
160+
- `CKM_NSS_PKCS12_PBE_SHA*_HMAC_KEY_GEN` (NSS builds only)
161+
- `CKM_PKCS5_PBKD2`
162+
* Added new types:
163+
- `CKO_DATA`
164+
- `CKO_NSS_TRUST` (NSS builds only)
165+
* Added new attributes:
166+
- `CKA_CERTIFICATE_TYPE`
167+
- `CKA_CERTIFICATE_CATEGORY`
168+
- `CKA_ID`
169+
- `CKA_ISSUER`
170+
- `CKA_SERIAL_NUMBER`
171+
- `CKA_PUBLIC_KEY_INFO`
172+
- `CKA_URL`
173+
- `CKA_HASH_OF_SUBJECT_PUBLIC_KEY`
174+
- `CKA_HASH_OF_ISSUER_PUBLIC_KEY`
175+
- `CKA_NAME_HASH_ALGORITHM`
176+
- `CKA_CHECK_VALUE`
177+
- `CKA_CERT_SHA1_HASH` (NSS builds only)
178+
- `CKA_CERT_MD5_HASH` (NSS builds only)
179+
- `CKA_TRUST_SERVER_AUTH` (NSS builds only)
180+
- `CKA_TRUST_CLIENT_AUTH` (NSS builds only)
181+
- `CKA_TRUST_EMAIL_PROTECTION` (NSS builds only)
182+
- `CKA_TRUST_CODE_SIGNING` (NSS builds only)
183+
- `CKA_TRUST_STEP_UP_APPROVED` (NSS builds only)
184+
- `CKA_NSS_EMAIL` (NSS builds only)
185+
- `CKA_NSS_DB` (NSS builds only, not stored)
186+
* Added SHA3 support for digest and HMAC
187+
* Added AES key gen and key wrap
188+
* Added `--enable-nss` for NSS specific PKCS11 quirks
189+
* Fixed ECC derive key curve error
190+
* Fixed object boolean attributes and permissions
191+
* Fixed `C_SetAttributeValue` sometimes erasing keys
192+
* Fixed wolfCrypt FIPSv5 and FIPSv6 support
193+
* Fixed token erasure on load error
194+
* Fixed various memory leaks
195+
* Complete re-write of file based token path handling
196+
* Added debugging output
197+
* Fixed visibility issues
198+
* Fixed x963 usage for ECC keys
199+
* Added support for older wolfSSL versions
200+
* Fixed token overwriting previous objects
201+
* Fixed token load error handling
202+
* Improved error handling for `C_Login`
203+
* Improved Debian packaging
204+
* Fixed build issues with wolfBoot
205+
* Fixed `malloc(0)` code path
206+
* Fixed `C_CopyObject` not doing a deep copy
207+
* Added `CKM_RSA_PKCS` to wrap / unwrap
208+
* Fixed ECC curve lookup for FIPSv5
209+
* Fixed default attributes for keys
210+
* `C_DestroyObject` now deletes files instead of leaving truncated files
211+
* Added support for STM32U5 DHUK wrapping
212+
* Added PBKDF2 support for pins
213+
- Enabled by default for FIPS
214+
- Enabled using `--enable-pbkdf2` or defining `WOLFPKCS11_PBKDF2`
215+
* Added `--pbkdf2-iterations` and `PBKDF2_ITERATIONS` to set the number of
216+
PBKDF2 iterations for pin handling (default 600,000).
217+
111218
### wolfPKCS11 Release 1.3 (Mar 22, 2024)
112219

113220
**Summary**

configure.ac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
AC_COPYRIGHT([Copyright (C) 2014-2023 wolfSSL Inc.])
99
AC_PREREQ([2.63])
10-
AC_INIT([wolfpkcs11],[1.3.0],[https://github.com/wolfssl/wolfpkcs11/issues],[wolfpkcs11],[http://www.wolfssl.com])
10+
AC_INIT([wolfpkcs11],[2.0.0],[https://github.com/wolfssl/wolfpkcs11/issues],[wolfpkcs11],[http://www.wolfssl.com])
1111
AC_CONFIG_AUX_DIR([build-aux])
1212

1313
# The following sets CFLAGS to empty if unset on command line.
@@ -36,11 +36,11 @@ AC_CONFIG_HEADERS([wolfpkcs11/config.h])
3636
# The three numbers in the libpkcs11.so.*.*.* file name. Unfortunately
3737

3838
# increment if interfaces have been removed or changed
39-
WOLFPKCS11_LIBRARY_VERSION_FIRST=3
39+
WOLFPKCS11_LIBRARY_VERSION_FIRST=4
4040

4141
# increment if interfaces have been added
4242
# set to zero if WOLFPKCS11_LIBRARY_VERSION_FIRST is incremented
43-
WOLFPKCS11_LIBRARY_VERSION_SECOND=1
43+
WOLFPKCS11_LIBRARY_VERSION_SECOND=0
4444

4545
# increment if source code has changed
4646
# set to zero if WOLFPKCS11_LIBRARY_VERSION_FIRST is incremented or

debian/changelog

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
wolfpkcs11 (1.3.0) stable; urgency=medium
1+
wolfpkcs11 (2.0.0) stable; urgency=medium
22

33
* For a full changelog see
44
https://github.com/wolfSSL/wolfPKCS11/blob/master/README.md
55

6-
-- wolfSSL <[email protected]> Mon, 07 Jul 2025 10:30:00 +0000
6+
-- wolfSSL <[email protected]> Tue, 26 Aug 2025 16:49:00 +0000

debian/rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ DPKG_EXPORT_BUILDFLAGS = 1
1515
include /usr/share/dpkg/buildflags.mk
1616

1717
# Configure options for the build
18-
CONFIGURE_OPTS = --enable-debug --enable-aesecb --enable-nss
18+
CONFIGURE_OPTS = --enable-aesctr --enable-aesccm --enable-aeskeywrap --enable-aesecb --enable-nss
1919

2020
%:
2121
dh $@ --with autoreconf

wolfpkcs11/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
extern "C" {
2929
#endif
3030

31-
#define LIBWOLFPKCS11_VERSION_STRING "1.3.0"
32-
#define LIBWOLFPKCS11_VERSION_HEX 0x01003000
31+
#define LIBWOLFPKCS11_VERSION_STRING "2.0.0"
32+
#define LIBWOLFPKCS11_VERSION_HEX 0x02000000
3333

3434
#ifdef __cplusplus
3535
}

0 commit comments

Comments
 (0)