Skip to content

Commit

Permalink
nss: Set NSS_PKCS11_2_0_COMPAT to ensure using the compat interface f…
Browse files Browse the repository at this point in the history
…or now.

This might resolve the issue seen in #334

As per conversation with Bob:

	The issue is building with nss 3.52, If you build with 3.51 and run with
	3.52 you won't run into the issue.  It's the default for the definition
	of CK_GCM_PARAMS. The spec and the released headers were different from
	OASIS. In that case, the header is authoritative and we used the spec NSS
	needs to move the new definition, but doing so will break things that
	compile with NSS. To get around it you can add -DNSS_PKCS11_2_0_COMPAT
	or include it in your .c file

	Long term, you'll actually want to move the the AEAD interface.
	There's a new PKCS #11 interface that allows you to operate multiple AEAD
	operations on a single key. It allows token IV generation. I added new
	wrappers in 3.52 to handle the differences between tokens and mechanism
  • Loading branch information
letoams committed May 12, 2020
1 parent 739fbab commit 65a4979
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/lswnss.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
#include "lswalloc.h"
#include "secrets.h"

/*
* Special advise from Bob Relyea
*
*/
#define NSS_PKCS11_2_0_COMPAT 1

enum lsw_nss_flags {
LSW_NSS_READONLY = 1,
/*
Expand Down

0 comments on commit 65a4979

Please sign in to comment.