Skip to content

Commit

Permalink
Update kea_alg_defs to match NSS 3.97
Browse files Browse the repository at this point in the history
The kea_alg_defs array in SSLCipher.c has been updated to match
the one defined in NSS 3.97. The assertion that compares the size
of the array with ssl_kea_size has also been removed. These
changes will allow JSS to work with the newer NSS 3.97 on Fedora
Rawhide as well as the older NSS versions on other platforms.

Resolves: #991
  • Loading branch information
edewata committed Feb 7, 2024
1 parent 68a0df2 commit 4966de8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions native/src/main/native/org/mozilla/jss/ssl/SSLCipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static const CK_MECHANISM_TYPE auth_alg_defs[] = {
};
PR_STATIC_ASSERT(PR_ARRAY_SIZE(auth_alg_defs) == ssl_auth_size);

/* Copied from NSS's ssl3con.c. */
/* Copied from NSS 3.97's ssl3con.c. */
static const CK_MECHANISM_TYPE kea_alg_defs[] = {
CKM_INVALID_MECHANISM, /* ssl_kea_null */
CKM_RSA_PKCS, /* ssl_kea_rsa */
Expand All @@ -33,8 +33,9 @@ static const CK_MECHANISM_TYPE kea_alg_defs[] = {
CKM_ECDH1_DERIVE, /* ssl_kea_ecdh_psk */
CKM_DH_PKCS_DERIVE, /* ssl_kea_dh_psk */
CKM_INVALID_MECHANISM, /* ssl_kea_tls13_any */
CKM_INVALID_MECHANISM, /* ssl_kea_ecdh_hybrid */
CKM_INVALID_MECHANISM, /* ssl_kea_ecdh_hybrid_psk */
};
PR_STATIC_ASSERT(PR_ARRAY_SIZE(kea_alg_defs) == ssl_kea_size);

#ifdef HAVE_NSS_CIPHER_SUITE_INFO_KDFHASH
/* Not present in ssl3con.c. */
Expand Down

0 comments on commit 4966de8

Please sign in to comment.