├── README.md └── en-us └── docs └── mozilla └── projects └── nss ├── tools ├── vfyserv │ └── index.html ├── nss_tools_signver-tasks │ └── index.html ├── nss_tools_pk12util-tasks │ └── index.html ├── nss_tools_modutil-tasks │ └── index.html ├── nss_tools_dbck-tasks │ └── index.html └── nss_tools_certutil-tasks │ └── index.html ├── troubleshooting └── index.html ├── pkcs11 ├── index.html └── module_installation │ └── index.html ├── reference ├── building_and_installing_nss │ ├── index.html │ ├── sample_manual_installation │ │ └── index.html │ └── installation_guide │ │ └── index.html ├── nss_tools │ └── index.html ├── fc_logout │ └── index.html ├── fc_findobjectsfinal │ └── index.html ├── fc_closesession │ └── index.html ├── fc_getfunctionstatus │ └── index.html ├── fc_cancelfunction │ └── index.html ├── fc_destroyobject │ └── index.html ├── nss_tools__colon__vfyserv │ └── index.html ├── fc_digestinit │ └── index.html ├── fc_getobjectsize │ └── index.html ├── fc_decryptinit │ └── index.html ├── fc_closeallsessions │ └── index.html ├── fc_waitforslotevent │ └── index.html ├── fc_generaterandom │ └── index.html ├── fc_verifyinit │ └── index.html ├── fc_signrecoverinit │ └── index.html ├── fc_getmechanisminfo │ └── index.html ├── fc_verifyfinal │ └── index.html ├── fc_getmechanismlist │ └── index.html ├── fc_verifyrecoverinit │ └── index.html ├── fc_digestkey │ └── index.html ├── fc_setattributevalue │ └── index.html ├── fc_getslotlist │ └── index.html ├── nss_cryptographic_module │ └── index.html ├── fc_getattributevalue │ └── index.html ├── fc_signinit │ └── index.html ├── fc_decryptfinal │ └── index.html ├── fc_seedrandom │ └── index.html ├── fc_encryptfinal │ └── index.html ├── fc_findobjectsinit │ └── index.html ├── fc_createobject │ └── index.html ├── fc_getslotinfo │ └── index.html ├── fc_setpin │ └── index.html ├── fc_digestfinal │ └── index.html ├── fc_findobjects │ └── index.html ├── fc_signupdate │ └── index.html ├── fc_verifyupdate │ └── index.html ├── fc_signfinal │ └── index.html ├── fc_encryptinit │ └── index.html ├── fc_generatekey │ └── index.html ├── fc_digestupdate │ └── index.html ├── fc_getoperationstate │ └── index.html ├── fc_copyobject │ └── index.html ├── fc_encrypt │ └── index.html ├── fc_verify │ └── index.html ├── fc_decrypt │ └── index.html ├── fc_sign │ └── index.html ├── fc_digest │ └── index.html ├── fc_getfunctionlist │ └── index.html ├── fc_signrecover │ └── index.html ├── nss_functions │ └── index.html ├── fc_verifyrecover │ └── index.html ├── fc_derivekey │ └── index.html ├── fc_opensession │ └── index.html ├── fc_decryptupdate │ └── index.html ├── fc_encryptupdate │ └── index.html ├── fc_signencryptupdate │ └── index.html ├── fc_wrapkey │ └── index.html ├── fc_decryptdigestupdate │ └── index.html ├── fc_digestencryptupdate │ └── index.html ├── fc_decryptverifyupdate │ └── index.html ├── nss_key_functions │ └── index.html ├── fc_getsessioninfo │ └── index.html ├── fc_finalize │ └── index.html ├── fc_setoperationstate │ └── index.html ├── fc_initpin │ └── index.html └── fc_unwrapkey │ └── index.html ├── jss └── build_instructions_for_jss_4.4.x │ └── index.html ├── modutil-tasks.html └── index.html ├── nss_tech_notes └── index.html ├── nss_third-party_code └── index.html ├── nss_sample_code └── index.html ├── certverify_log └── index.html ├── new_nss_samples └── index.html ├── nss_3.59.1_release_notes └── index.html ├── nss_3.60.1_release_notes └── index.html ├── nss_3.36.4_release_notes └── index.html ├── cert_findcertbydercert └── index.html ├── nss_3.37.3release_notes └── index.html ├── blank_function └── index.html ├── nss_3.63.1_release_notes └── index.html ├── nss_3.22.3_release_notes └── index.html ├── nss_3.22.1_release_notes └── index.html ├── nss_3.31.1_release_notes └── index.html ├── nss_3.36.5_release_notes └── index.html ├── nss_3.29.3_release_notes └── index.html ├── code_coverage └── index.html ├── nss_3.52.1_release_notes └── index.html ├── nss_3.21.2_release_notes └── index.html ├── deprecated_ssl_functions └── index.html ├── nss_3.53.1_release_notes └── index.html ├── nss_3.44.4_release_notes └── index.html ├── nss_3.64_release_notes └── index.html ├── nss_3.30.1_release_notes └── index.html ├── nss_3.40.1_release_notes └── index.html ├── nss_3.36.6_release_notes └── index.html ├── cert_findcertbyissuerandsn └── index.html └── nss_3.17_release_notes └── index.html /README.md: -------------------------------------------------------------------------------- 1 | # nss-docs 2 | -------------------------------------------------------------------------------- /en-us/docs/mozilla/projects/nss/tools/vfyserv/index.html: -------------------------------------------------------------------------------- 1 |
Coming soon
On this page, let's collect information on how to troubleshoot NSS at runtime. Debugging tips, how to enable tracing of the various modules, etc.
2 |PKCS #11 information for implementors of cryptographic modules:
2 | 3 |This chapter describes how to build and install NSS.
2 |Newsgroup: mozilla.dev.tech.crypto
Newsgroup: mozilla.dev.tech.crypto
2 | 3 |To build JSS see Upstream JSS Build/Test Instructions
4 | 5 |Newsgroup: mozilla.dev.tech.crypto
Newsgroup: mozilla.dev.tech.crypto 2 | 3 | 4 |
Newsgroup: mozilla.dev.tech.crypto
2 |NSS technical notes provide latest information about new NSS features and supplementary documentation for advanced topics in programming with NSS.
3 |This is a list of third-party code included in the NSS repository, broken into two lists: Code that can be compiled into the NSS libraries, and code that is only used for testing.
2 | 3 |Note that not all code that can be compiled into the NSS libraries necessarily is. Often this is configurable at build time, with various trade-offs.
certutil certutil
2 | 3 |pk12util pk12util
4 | 5 |modutil modutil
6 | 7 |crlutil crlutil
8 | 9 |cmsutil cmsutil
10 | 11 |vfychain vfychain
12 | 13 |vfyserv vfyserv
14 | 15 |ssltap ssltap
16 | 17 |This is still a work in progress and in early stages.
18 | 19 |These man pages where generated from XML docbook files.
FC_Logout - log a user out from a token. 2 |
CK_RV FC_Logout( 3 | CK_SESSION_HANDLE hSession 4 | ); 5 |
hSessionLogs the current user out of a USER_FUNCTIONS session. 7 |
2 | The NSS build system does not include a target to install header files and shared libraries in the system directories, so this needs to be done manually.
3 |
After building NSS with "gmake nss_build_all", the resulting build can be found in the NSS source tree as follows: 4 |
5 |where <OBJ-DIR> would vary according to the type of build and the platform. For example, <OBJ-DIR> for a debug build of NSS on the x86 platform with a Linux kernel version 2.6 with glibc would be: Linux2.6_x86_glibc_PTH_DBG.OBJ 11 |
From these directories, you can copy the files to any system (or other) directory. If the destination directories are not what's standard for the system (e.g. /usr/include, /usr/lib and /usr/bin for a Linux system), you need to edit the corresponding environment variables or compiler/linker arguments. 12 |
FC_FindObjectsFinal - terminate an object search. 2 |
CK_RV FC_FindObjectsFinal( 3 | CK_SESSION_HANDLE hSession, 4 | ); 5 |
hSessionClears the object search criteria for a session. 7 |
FC_CloseSession - close a session opened between an application and a token. 2 |
CK_RV FC_CloseSession( 3 | CK_SESSION_HANDLE hSession 4 | ); 5 |
hSessionFC_CloseSession closes a session between an application and a token.
7 |
A user may call FC_CloseSession without logging into the token (to assume the NSS User role).
8 |
FC_GetFunctionStatus - get the status of a function running in parallel 2 |
CK_RV FC_GetFunctionStatus( 3 | CK_SESSION_HANDLE hSession 4 | ); 5 |
hSessionFC_GetFunctionStatus is a legacy function that simply returns CKR_FUNCTION_NOT_PARALLEL.
7 |
FC_GetFunctionStatus always returns CKR_FUNCTION_NOT_PARALLEL.
8 |
FC_CancelFunction - cancel a function running in parallel 2 |
CK_RV FC_CancelFunction( 3 | CK_SESSION_HANDLE hSession 4 | ); 5 |
hSessionParallel functions are not implemented. FC_CancelFunction is a legacy function that simply returns CKR_FUNCTION_NOT_PARALLEL.
7 |
FC_CancelFunction always returns CKR_FUNCTION_NOT_PARALLEL.
8 |
FC_DestroyObject - destroy an object. 2 |
CK_RV FC_DestroyObject( 3 | CK_SESSION_HANDLE hSession, 4 | CK_OBJECT_HANDLE hObject 5 | ); 6 |
hSessionhObjectFC_DestroyObject destroys an object.
9 |
A user must log into the token (to assume the NSS User role) before destroying a secret or private key object. 10 |
Name
2 |vfyserv — TBD
3 |Synopsis
4 |vfyserv
5 |Description
6 |The vfyserv tool verifies a certificate chain
7 |Options
8 |Additional Resources
9 |For information about NSS and other tools related to NSS (like JSS), check
10 | out the NSS project wiki at
11 | [1]http://www.mozilla.org/projects/security/pki/nss/. The NSS site relates
12 | directly to NSS code changes and releases.
Mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto
14 |IRC: Freenode at #dogtag-pki
15 |Authors
16 |The NSS tools were written and maintained by developers with Netscape, Red
17 | Hat, and Sun.
Authors: Elio Maldonado <emaldona@redhat.com>, Deon Lackey
19 | <dlackey@redhat.com>.
Copyright
21 |(c) 2010, Red Hat, Inc. Licensed under the GNU Public License version 2.
22 |References
23 |Visible links
24 | 1. http://www.mozilla.org/projects/security/pki/nss/
25 |
FC_DigestInit - initialize a message-digest operation. 2 |
CK_RV FC_DigestInit( 3 | CK_SESSION_HANDLE hSession, 4 | CK_MECHANISM_PTR pMechanism 5 | ); 6 |
hSessionpMechanismFC_DigestInit initializes a message-digest operation.
9 |
A user may call FC_DigestInit without logging into the token (to assume the NSS User role).
10 |
Newsgroup: mozilla.dev.tech.crypto
4 |
5 |
6 |
key3.db; should prompt user for an initial password.The collection of sample code here demonstrates how NSS can be used for cryptographic operations, certificate handling, SSL, etc. It also demonstrates some best practices in the application of cryptography.
2 | 3 |Old samples in the process of being replaced.
4 | 5 |
15 | These are very old examples in need of replacement. See https://bugzilla.mozilla.org/show_bug.cgi?id=490238
You are welcome to download the new samples via:
18 | 19 |hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update SAMPLES_BRANCH 20 |21 | 22 |
The new samples: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/New_NSS_Samples
FC_GetObjectSize - create a copy of an object. 2 |
CK_RV FC_GetObjectSize( 3 | CK_SESSION_HANDLE hSession, 4 | CK_OBJECT_HANDLE hObject, 5 | CK_ULONG_PTR pusSize 6 | ); 7 |
hSessionhObjectpusSizeFC_GetObjectSize gets the size of an object in bytes.
11 |
A user must log into the token (to assume the NSS User role) before getting the size of a secret or private key object. 12 |
FC_DecryptInit - initialize a decryption operation. 2 |
CK_RV FC_DecryptInit( 3 | CK_SESSION_HANDLE hSession, 4 | CK_MECHANISM_PTR pMechanism, 5 | CK_OBJECT_HANDLE hKey 6 | ); 7 |
hSessionpMechanismhKeyFC_DecryptInit initializes a decryption operation.
11 |
A user must log into the token (to assume the NSS User role) before calling FC_DecryptInit.
12 |
FC_CloseAllSessions - close all sessions between an application and a token. 2 |
CK_RV FC_CloseAllSessions( 3 | CK_SLOT_ID slotID 4 | ); 5 |
slotIDFC_CloseAllSessions closes all sessions between an application and the token in the slot with the ID slotID.
7 |
The NSS cryptographic module currently doesn't call the surrender callback function Notify. (See PKCS #11 v2.20 section 11.17.1.)
8 |
A user may call FC_CloseAllSessions without logging into the token (to assume the NSS User role).
9 |
FC_WaitForSlotEvent - waits for a slot event, such as token insertion or token removal, to occur. 2 |
CK_RV FC_WaitForSlotEvent(CK_FLAGS flags, CK_SLOT_ID_PTR pSlot CK_VOID_PTR pReserved); 3 |
FC_WaitForSlotEvent takes three parameters:
4 |
flags
7 | pSlot.
9 | pReserved.
11 | This function is not supported by the NSS cryptographic module. 14 |
FC_WaitForSlotEvent always returns CKR_FUNCTION_NOT_SUPPORTED.
15 |
FC_GenerateRandom - generate a random number. 2 |
CK_RV FC_GenerateRandom( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pRandomData, 5 | CK_ULONG ulRandomLen 6 | ); 7 |
hSessionpRandomDataulRandomLenFC_GenerateRandom generates random data of the specified length.
11 |
A user may call FC_GenerateRandom without logging into the token (to assume the NSS User role).
12 |
FC_VerifyInit - initialize a verification operation. 2 |
CK_RV FC_VerifyInit( 3 | CK_SESSION_HANDLE hSession, 4 | CK_MECHANISM_PTR pMechanism, 5 | CK_OBJECT_HANDLE hKey 6 | ); 7 |
hSessionpMechanismhKeyFC_VerifyInit initializes a verification operation where the signature is an appendix to the data.
11 |
A user must log into the token (to assume the NSS User role) before calling FC_VerifyInit.
12 |
FC_SignRecoverInit - initialize a sign recover operation. 2 |
CK_RV FC_SignRecoverInit( 3 | CK_SESSION_HANDLE hSession, 4 | CK_MECHANISM_PTR pMechanism, 5 | CK_OBJECT_HANDLE hKey 6 | ); 7 |
hSessionpMechanismhKeyFC_SignRecoverInit initializes a initializes a signature operation where the (digest) data can be recovered from the signature.
11 |
A user must log into the token (to assume the NSS User role) before calling FC_SignRecoverInit.
12 |
FC_GetMechanismInfo - get information on a particular mechanism. 2 |
CK_RV FC_GetMechanismInfo( 3 | CK_SLOT_ID slotID, 4 | CK_MECHANISM_TYPE type, 5 | CK_MECHANISM_INFO_PTR pInfo 6 | ); 7 |
FC_GetMechanismInfo takes three parameters:
8 |
slotID
10 | type
11 | pInfo
13 | FC_GetMechanismInfo obtains information about a particular mechanism possibly supported by a token.
15 |
A user may call FC_GetMechanismInfo without logging into the token (to assume the NSS User role).
16 |
CKR_OK
17 |
FC_VerifyFinal - finish a multi-part verify operation. 2 |
CK_RV FC_VerifyFinal( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pSignature, 5 | CK_ULONG usSignatureLen 6 | ); 7 |
hSessionpSignatureusSignatureLenFC_VerifyFinal finishes a multi-part signature verification operation.
11 |
A user must log into the token (to assume the NSS User role) before calling FC_VerifyFinal.
12 |
FC_GetMechanismList - get a list of mechanism types supported by a token. 2 |
CK_RV FC_GetMechanismList( 3 | CK_SLOT_ID slotID, 4 | CK_MECHANISM_TYPE_PTR pMechanismList, 5 | CK_ULONG_PTR pusCount 6 | ); 7 |
FC_GetMechanismList takes three parameters:
8 |
slotID
10 | pInfo
11 | FC_GetMechanismList obtains a list of mechanism types supported by a token.
13 |
A user may call FC_GetMechanismList without logging into the token (to assume the NSS User role).
14 |
CKR_OK
15 |
FC_VerifyRecoverInit - initialize a verification operation where data is recoverable. 2 |
CK_RV FC_VerifyRecoverInit( 3 | CK_SESSION_HANDLE hSession, 4 | CK_MECHANISM_PTR pMechanism, 5 | CK_OBJECT_HANDLE hKey 6 | ); 7 |
hSessionpMechanismhKeyFC_VerifyRecoverInit initializes a signature verification operation where the (digest) data can be recovered from the signature.
11 |
A user must log into the token (to assume the NSS User role) before calling FC_VerifyRecoverInit.
12 |
All the NSS verify functions except, the *VerifyNow() functions, take a parameter called 'CERTVerifyLog'. If you supply the log parameter, NSS will continue chain validation after each error . The log tells you what the problem was with the chain and what certificate in the chain failed.
2 |To create a log:
3 |#include "secport.h" 4 | #include "certt.h" 5 | 6 | CERTVerifyLog *log; 7 | 8 | arena = PORT_NewArena(512); 9 | log = PORT_ArenaZNew(arena,log); 10 | log->arena = arena; 11 |12 |
You can then pass this log into your favorite cert verify function. On return:
13 |Each entry is a CERTVerifyLogNode. Defined in certt.h:
16 |/*
17 | * This structure is used to keep a log of errors when verifying
18 | * a cert chain. This allows multiple errors to be reported all at
19 | * once.
20 | */
21 | struct CERTVerifyLogNodeStr {
22 | CERTCertificate *cert; /* what cert had the error */
23 | long error; /* what error was it? */
24 | unsigned int depth; /* how far up the chain are we */
25 | void *arg; /* error specific argument */
26 | struct CERTVerifyLogNodeStr *next; /* next in the list */
27 | struct CERTVerifyLogNodeStr *prev; /* next in the list */
28 | };
29 |
30 | The list is a doubly linked NULL terminated list sorted from low to high based on depth into the cert chain. When you are through, you will need to walk the list and free all the cert entries, then free the arena.
FC_DigestKey - add the digest of a key to a multi-part digest operation. 2 |
CK_RV FC_DigestKey( 3 | CK_SESSION_HANDLE hSession, 4 | CK_OBJECT_HANDLE hKey 5 | ); 6 |
hSessionhKeyFC_DigestKey continues a multi-part digest operation by digesting the value of a secret key. The digest for the entire message is returned by a call to FC_DigestFinal.
9 |
A user must log into the token (to assume the NSS User role) before calling FC_DigestKey.
10 |
FC_SetAttributeValue - set the values of attributes of an object. 2 |
CK_RV FC_SetAttributeValue( 3 | CK_SESSION_HANDLE hSession, 4 | CK_OBJECT_HANDLE hObject, 5 | CK_ATTRIBUTE_PTR pTemplate, 6 | CK_ULONG usCount 7 | ); 8 |
hSessionhObjectpTemplateusCountFC_SetAttributeValue sets the value of one or more attributes of an object.
13 |
A user must log into the token before setting the attribute values of a secret or private key object. 14 |
FC_GetSlotList - Obtain a list of slots in the system. 2 |
CK_RV FC_GetSlotList( 3 | CK_BBOOL tokenPresent, 4 | CK_SLOT_ID_PTR pSlotList, 5 | CK_ULONG_PTR pulCount 6 | ); 7 |
tokenPresent
8 | pSlotList
10 | CK_SLOT_ID objects.
11 | pulCount
12 | CK_ULONG variable which receives the slot count.;
13 | FC_GetSlotList obtains a list of slots in the system.
A user may call FC_GetSlotList without logging into the token (to assume the NSS User role).
14 |
CKR_OK
15 |
This chapter describes the data types and functions that one can use to perform cryptographic operations with the NSS cryptographic module. The NSS cryptographic module uses the industry standard PKCS #11 v2.20 as its API with some extensions. Therefore, an application that supports PKCS #11 cryptographic tokens can be easily modified to use the NSS cryptographic module.
2 | 3 |The NSS cryptographic module has two modes of operation: the non-FIPS (default) mode and FIPS mode. The FIPS mode is an Approved mode of operation compliant to FIPS 140-2. Both modes of operation use the same data types but are implemented by different functions.
4 | 5 |The NSS cryptographic module also exports the function NSC_ModuleDBFunc for managing the NSS module database secmod.db. The following sections document the data types and functions.
11 | 12 |FC_GetAttributeValue - get the value of attributes of an object. 2 |
CK_RV FC_GetAttributeValue( 3 | CK_SESSION_HANDLE hSession, 4 | CK_OBJECT_HANDLE hObject, 5 | CK_ATTRIBUTE_PTR pTemplate, 6 | CK_ULONG usCount 7 | ); 8 |
hSessionhObjectpTemplateusCountFC_GetAttributeValue gets the value of one or more attributes of an object.
13 |
A user must log into the token (to assume the NSS User role) before getting the attribute values of a secret or private key object. 14 |
FC_SignInit - initialize a signing operation. 2 |
CK_RV FC_SignInit( 3 | CK_SESSION_HANDLE hSession, 4 | CK_MECHANISM_PTR pMechanism, 5 | CK_OBJECT_HANDLE hKey 6 | ); 7 |
hSessionpMechanismhKeyFC_SignInit initializes a signature operation.
11 |
A user must log into the token (to assume the NSS User role) before calling FC_SignInit.
12 |
FC_DecryptFinal - finish a multi-part decryption operation. 2 |
CK_RV FC_DecryptFinal( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pLastPart, 5 | CK_ULONG_PTR pusLastPartLen 6 | ); 7 |
hSessionpLastPartpusLastPartLenFC_DecryptFinal returns the last block of data of a multi-part decryption operation.
11 |
A user must log into the token (to assume the NSS User role) before calling FC_DecryptFinal.
12 |
FC_SeedRandom() - mix additional seed material into the random number generator.
2 |
CK_RV FC_SeedRandom( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pSeed, 5 | CK_ULONG usSeedLen 6 | ); 7 |
hSessionpSeedusSeedLenFC_SeedRandom() mixes additional seed material into the token's random number generator. Note that FC_SeedRandom() doesn't provide the initial seed material for the random number generator. The initial seed material is provided by the NSS cryptographic module itself.
11 |
12 | A user may call FC_SeedRandom() without logging into the token (to assume the NSS User role).
13 |
FC_EncryptFinal - finish a multi-part encryption operation. 2 |
CK_RV FC_EncryptFinal( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pLastEncryptedPart, 5 | CK_ULONG_PTR pusLastEncryptedPartLen 6 | ); 7 |
hSessionpLastEncryptedPartpusLastEncryptedPartLenFC_EncryptFinal returns the last block of data of a multi-part encryption operation.
11 |
A user must log into the token (to assume the NSS User role) before calling FC_EncryptFinal.
12 |
FC_FindObjectsInit - initialize the parameters for an object search. 2 |
CK_RV FC_FindObjectsInit( 3 | CK_SESSION_HANDLE hSession, 4 | CK_ATTRIBUTE_PTR pTemplate, 5 | CK_ULONG usCount 6 | ); 7 |
hSessionpTemplateusCountFC_FindObjectsInit sets the attribute list for an object search. If FC_FindObjectsInit is successful FC_FindObjects may be called one or more times to retrieve handles of matching objects.
11 |
A user must log into the token (to assume the NSS User role) before searching for secret or private key objects. 12 |
FC_CreateObject - create a new object. 2 |
CK_RV FC_CreateObject( 3 | CK_SESSION_HANDLE hSession, 4 | CK_ATTRIBUTE_PTR pTemplate, 5 | CK_ULONG ulCount, 6 | CK_OBJECT_HANDLE_PTR phObject 7 | ); 8 |
hSessionpTemplateulCountphObjectFC_CreateObject creates an object using the attributes specified in the template.
13 |
A user must log into the token (to assume the NSS User role) before calling FC_CreateObject.
14 |
FC_GetSlotInfo - get information about a particular slot in the system. 2 |
CK_RV FC_GetSlotInfo( 3 | CK_SLOT_ID slotID, 4 | CK_SLOT_INFO_PTR pInfo 5 | ); 6 |
FC_GetSlotInfo takes two parameters:
7 |
slotID
10 | pInfo
13 | CK_SLOT_INFO structure.
15 | FC_GetSlotInfo stores the information about the slot in the CK_SLOT_INFO structure that
17 | pInfo points to.
A user may call FC_GetSlotInfo without logging into the token (to assume the NSS User role).
19 |
CKR_OKCKR_SLOT_ID_INVALIDFC_SetPIN - Modify the user's PIN. 2 |
CK_RV FC_SetPIN( 3 | CK_SESSION_HANDLE hSession, 4 | CK_CHAR_PTR pOldPin, 5 | CK_ULONG ulOldLen, 6 | CK_CHAR_PTR pNewPin, 7 | CK_ULONG ulNewLen 8 | ); 9 |
FC_SetPIN takes five parameters:
10 |
hSession
12 | pOldPin
14 | ulOldLen
16 | pNewPin
18 | ulNewLen
20 | FC_SetPIN modifies the PIN of the user. The user must log into the token (to assume the NSS User role) before calling FC_SetPIN.
22 |
CKR_OK
23 |
FC_DigestFinal - finish a multi-part digest operation. 2 |
CK_RV FC_DigestFinal( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pDigest, 5 | CK_ULONG_PTR pulDigestLen 6 | ); 7 |
hSessionpDigestpulDigestLenFC_DigestFinal finishes a multi-part digest operation by returning the complete digest and clearing the operation context. If pDigest is NULL the length of the digest is returned and FC_DigestFinal may be called again with pDigest set to retrieve the digest.
11 |
A user may call FC_DigestFinal without logging into the token (to assume the NSS User role).
12 |
FC_FindObjects - Search for one or more objects 2 |
CK_RV FC_FindObjects( 3 | CK_SESSION_HANDLE hSession, 4 | CK_OBJECT_HANDLE_PTR phObject, 5 | CK_ULONG usMaxObjectCount, 6 | CK_ULONG_PTR pusObjectCount 7 | ); 8 |
hSessionpTemplateusMaxObjectCountpusObjectCountFC_FindObjects returns the next set of object handles matching the criteria set up by the previous call to FC_FindObjectsInit and sets the object count variable to their number or to zero if there are none.
13 |
FC_SignUpdate - process the next block of a multi-part signing operation. 2 |
CK_RV FC_SignUpdate( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pPart, 5 | CK_ULONG usPartLen 6 | ); 7 |
hSessionpPartusPartLenFC_SignUpdate starts or continues a multi-part signature operation. One or more blocks may be part of the signature. The signature for the entire message is returned by a call to FC_SignFinal.
11 |
A user must log into the token (to assume the NSS User role) before calling FC_SignUpdate.
12 |
FC_VerifyUpdate - process the next block of a multi-part verify operation. 2 |
CK_RV FC_VerifyUpdate( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pPart, 5 | CK_ULONG usPartLen 6 | ); 7 |
hSessionpPartusPartLenFC_VerifyUpdate starts or continues a multi-part signature verification operation where the signature is an appendix to the data. One or more blocks may be part of the signature. The result for the entire message is returned by a call to FC_VerifyFinal.
11 |
A user must log into the token (to assume the NSS User role) before calling FC_VerifyUpdate.
12 |
FC_SignFinal - finish a multi-part signing operation. 2 |
CK_RV FC_SignFinal( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pSignature, 5 | CK_ULONG_PTR pusSignatureLen 6 | ); 7 |
hSessionpSignaturepusSignatureLenFC_SignFinal finishes a multi-part signing operation by returning the complete signature and clearing the operation context. If pSignature is NULL the length of the signature is returned and FC_SignFinal may be called again with pSignature set to retrieve the signature.
11 |
A user must log into the token (to assume the NSS User role) before calling FC_SignFinal.
12 |
The build system of NSS originated from Netscape's build system, 2 | which predated the "configure; make; make test; make install" 3 | sequence that we're familiar with now. Our makefiles also have 4 | an "install" target, but it has a different meaning: our "install" 5 | means installing the headers, libraries, and programs in the 6 | appropriate directories under mozilla/dist. 7 |
So right now you need to manually install the headers, libraries, 8 | and programs in the directories you want. If you install the 9 | libraries in a directory other than /usr/lib, you usually need 10 | to set the LD_LIBRARY_PATH environment variable. You can avoid 11 | that by installing the libraries in a directory that is 12 | $ORIGIN/../lib, where $ORIGIN is the directory where the programs 13 | are installed. This is done here: 14 | http://lxr.mozilla.org/security/sour...platlibs.mk#53 15 |
16 |53 ifeq ($(OS_ARCH), Linux) 17 | 54 ifeq ($(USE_64), 1) 18 | 55 EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:$$ORIGIN/../lib' 19 | 56 else 20 | 57 EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib' 21 | 58 endif 22 | 59 endif 23 |24 |
For example, if you install certutil in /foo/bar/nss/bin and the 25 | .so's in /foo/bar/nss/lib, then you only need to add /foo/bar/nss/bin 26 | to your PATH; you don't need to set LD_LIBRARY_PATH. 27 |
The libraries you need to install are listed below. 28 |
NSPR: 29 |
30 |NSS: (Note the use of * for libfreebl -- some platforms have multiple 35 | ones) 36 |
37 |FC_EncryptInit - initialize an encryption operation. 2 |
CK_RV FC_EncryptInit( 3 | CK_SESSION_HANDLE hSession, 4 | CK_MECHANISM_PTR pMechanism, 5 | CK_OBJECT_HANDLE hKey 6 | ); 7 |
hSessionpMechanismhKeyFC_EncryptInit initializes an encryption operation with the mechanism and key to be used.
18 |
A user must log into the token (to assume the NSS User role) before calling FC_EncryptInit.
20 |
CKR_OKCKR_SLOT_ID_INVALIDFC_GenerateKey - generate a new key 2 |
CK_RV FC_GenerateKey( 3 | CK_SESSION_HANDLE hSession, 4 | CK_MECHANISM_PTR pMechanism, 5 | CK_ATTRIBUTE_PTR pTemplate, 6 | CK_ULONG ulCount, 7 | CK_OBJECT_HANDLE_PTR phKey 8 | ); 9 |
hSessionpMechanismpTemplateulCountphKeyFC_GenerateKey generates a secret key, creating a new key object. The handle of new key is returned.
15 |
A user must log into the token (to assume the NSS User role) before calling FC_GenerateKey.
16 |
FC_DigestUpdate - process the next block of a multi-part digest operation. 2 |
CK_RV FC_DigestUpdate( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pPart, 5 | CK_ULONG usPartLen 6 | ); 7 |
hSessionpPartusPartLenFC_DigestUpdate starts or continues a multi-part digest operation. One or more blocks may be part of the message digest operation. The digest for the entire message is returned by a call to FC_DigestFinal.
11 |
A user may call FC_DigestUpdate without logging into the token (to assume the NSS User role).
12 |
This collection of sample code demonstrates how NSS can be used for cryptographic operations, certificate handling, SSL, etc. It also demonstrates some best practices in the application of cryptography.
2 | 3 |
4 | These new examples are a work in progress. See https://bugzilla.mozilla.org/show_bug.cgi?id=490238
How to download the samples:
7 | 8 |hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update SAMPLES_BRANCH 9 |10 | 11 |
Samples list:
12 | 13 |Common code used by these samples:
23 | 24 |Thanks are due to Shailendra Jain, Mozilla Community member, who is the principal author of these samples.
FC_GetOperationState - get the cryptographic operation state of a session. 2 |
CK_RV FC_GetOperationState( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pOperationState, 5 | CK_ULONG_PTR pulOperationStateLen 6 | ); 7 |
hSessionpOperationStatepulOperationStateLenFC_GetOperationState saves the state of the cryptographic operation in a session. This function only works for digest operations for now. Therefore, a user may call FC_GetOperationState without logging into the token (to assume the NSS User role).
11 |
FC_CopyObject - create a copy of an object. 2 |
CK_RV FC_CopyObject( 3 | CK_SESSION_HANDLE hSession, 4 | CK_OBJECT_HANDLE hObject, 5 | CK_ATTRIBUTE_PTR pTemplate, 6 | CK_ULONG usCount, 7 | CK_OBJECT_HANDLE_PTR phNewObject 8 | ); 9 |
hSessionhObjectpTemplateusCountphnewObjectFC_CopyObject creates a copy of an object using the attributes specified in the template.
15 |
A user must log into the token (to assume the NSS User role) before copying a secret or private key object. 16 |
FC_Encrypt - Encrypt a block of data. 2 |
CK_RV FC_Encrypt( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pData, 5 | CK_ULONG usDataLen, 6 | CK_BYTE_PTR pEncryptedData, 7 | CK_ULONG_PTR pusEncryptedDataLen 8 | ); 9 |
hSessionpDatausDataLenpEncryptedDatapusEncryptedDataLenFC_Encrypt encrypts a block of data according to the attributes of the previous call to FC_EncryptInit.
15 |
A user must log into the token (to assume the NSS User role) before calling FC_Encrypt.
16 |
FC_Verify - sign a block of data. 2 |
CK_RV FC_Verify( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pData, 5 | CK_ULONG usDataLen, 6 | CK_BYTE_PTR pSignature, 7 | CK_ULONG usSignatureLen 8 | ); 9 |
hSessionpDatausDataLenpSignatureusSignatureLenFC_Verify verifies a signature in a single-part operation, where the signature is an appendix to the data.
15 |
A user must log into the token (to assume the NSS User role) before calling FC_Verify.
16 |
CKR_OK is returned on success. CKR_SIGNATURE_INVALID is returned for signature mismatch.
17 |
FC_Decrypt - Decrypt a block of data. 2 |
CK_RV FC_Decrypt( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pEncryptedData, 5 | CK_ULONG usEncryptedDataLen, 6 | CK_BYTE_PTR pData, 7 | CK_ULONG_PTR pusDataLen 8 | ); 9 |
hSessionpEncryptedDatausEncryptedDataLenpDatapusDataLenFC_Decrypt decrypts a block of data according to the attributes of the previous call to FC_DecryptInit.
15 |
A user must log into the token (to assume the NSS User role) before calling FC_Decrypt.
16 |
FC_Sign - sign a block of data. 2 |
CK_RV FC_Sign( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pData, 5 | CK_ULONG usDataLen, 6 | CK_BYTE_PTR pSignature, 7 | CK_ULONG_PTR pusSignatureLen 8 | ); 9 |
hSessionpDatausDataLenpSignaturepusSignatureLenFC_Sign signs a message in a single operation according to the attributes of the previous call to FC_SignInit.
15 |
A user must log into the token (to assume the NSS User role) before calling FC_Sign.
16 |
FC_Digest - digest a block of data. 2 |
CK_RV FC_Digest( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pData, 5 | CK_ULONG usDataLen, 6 | CK_BYTE_PTR pDigest, 7 | CK_ULONG_PTR pusDigestLen 8 | ); 9 |
hSessionpDatausDataLenpDigestpusDigestLenFC_Digest digests a message in a single operation according to the attributes of the previous call to FC_DigestInit.
15 |
A user may call FC_Digest without logging into the token (to assume the NSS User role).
16 |
The NSS team has released Network Security Services (NSS) 3.59.1 on 18 December 2020, which is a patch release for NSS 3.59.
The HG tag is NSS_3_59_1_RTM. NSS 3.59.1 requires NSPR 4.29 or newer.
2 | 3 |NSS 3.59.1 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |Other releases are available in NSS Releases.
NSS 3.59.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.59.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
FC_GetFunctionList - get a pointer to the list of function pointers in the FIPS mode of operation. 2 |
CK_RV FC_GetFunctionList(CK_FUNCTION_LIST_PTR *ppFunctionList); 3 |
FC_GetFunctionList has one parameter:
4 |
ppFunctionList
6 | FC_GetFunctionList stores in *ppFunctionList a pointer to the NSS cryptographic module's list of function pointers in the FIPS mode of operation.
8 |
A user may call FC_GetFunctionList without logging into the token (to assume the NSS User role).
9 |
FC_GetFunctionList always returns CKR_OK.
10 |
#include <assert.h> 11 | 12 | CK_FUNCTION_LIST_PTR pFunctionList; 13 | CK_RV crv; 14 | 15 | crv = FC_GetFunctionList(&pFunctionList); 16 | assert(crv == CKR_OK); 17 | 18 | /* invoke the FC_XXX function as pFunctionList->C_XXX */ 19 |
The NSS team released Network Security Services (NSS) 3.60.1 on 4 January 2021, which is a patch release for NSS 3.60.
The HG tag is NSS_3_60_1_RTM. NSS 3.60.1 requires NSPR 4.29 or newer.
2 | 3 |NSS 3.60.1 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |Other releases are available at NSS past releases.
NSS 3.60.1 shared libraries are backwards-compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.60.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report at bugzilla.mozilla.org under the NSS product.
FC_SignRecover - Sign data in a single recoverable operation. 2 |
CK_RV FC_SignRecover( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pData, 5 | CK_ULONG usDataLen, 6 | CK_BYTE_PTR pSignature, 7 | CK_ULONG_PTR pusSignatureLen 8 | ); 9 |
hSessionpDatausDataLenpSignaturepusSignatureLenFC_SignRecover signs data in a single operation where the (digest) data can be recovered from the signature. If pSignature is NULL only the length of the signature is returned in *pusSignatureLen.
15 |
A user must log into the token (to assume the NSS User role) before calling FC_SignRecover.
16 |
This page lists all exported functions in NSS 3.11.7 It was ported from here.
2 |This is a composite page. Section headings are links to the individual pages where you can edit them.
3 |Keywords:
4 |FC_VerifyRecover - Verify data in a single recoverable operation. 2 |
CK_RV FC_VerifyRecover( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pSignature, 5 | CK_ULONG usSignatureLen, 6 | CK_BYTE_PTR pData, 7 | CK_ULONG_PTR pusDataLen 8 | ); 9 |
hSessionpSignatureusSignatureLenpDatapusDataLenFC_VerifyRecover verifies data in a single operation where the (digest) data can be recovered from the signature. If pSignature is NULL only the length of the signature is returned in *pusSignatureLen.
15 |
A user must log into the token (to assume the NSS User role) before calling FC_VerifyRecover.
16 |
Network Security Services (NSS) 3.36.4 is a patch release for NSS 3.36.
The HG tag is NSS_3_36_4_RTM. NSS 3.36.4 requires NSPR 4.19 or newer.
2 | 3 |NSS 3.36.4 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |No new functionality is introduced in this release. This is a patch release to fix regression bugs.
Bug 1461731 - Fix crash on macOS related to authentication tokens, e.g. PK11or WebAuthn.
11 |NSS 3.36.4 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.36.4 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
FC_DeriveKey - derive a key from a base key 2 |
CK_RV FC_DeriveKey( 3 | CK_SESSION_HANDLE hSession, 4 | CK_MECHANISM_PTR pMechanism, 5 | CK_OBJECT_HANDLE hBaseKey, 6 | CK_ATTRIBUTE_PTR pTemplate, 7 | CK_ULONG usAttributeCount, 8 | CK_OBJECT_HANDLE_PTR phKey 9 | ); 10 |
hSessionpMechanismhBaseKeypWrappedKeypTemplateusAttributeCountphKeyFC_DeriveKey derives (decrypts) a key and creates a new key object.
18 |
A user must log into the token (to assume the NSS User role) before calling FC_DeriveKey.
19 |
2 | Find a certificate in the database that matches a DER-encoded certificate. 3 |
#include <cert.h> 4 | CERTCertificate *CERT_FindCertByDERCert( 5 | 6 | CERTCertDBHandle *handle, 7 | SECItem *derCert ); 8 |
handle | in pointer to a CERTCertDBHandle representing the certificate database to look in |
derCert | in pointer to an SECItem whose type must be siDERCertBuffer and whose data contains a DER-encoded certificate |
This function looks in the ?NSSCryptoContext? and the ?NSSTrustDomain? to find 11 | the certificate that matches the DER-encoded certificate. A match is found 12 | when the issuer and serial number of the DER-encoded certificate are found on 13 | a certificate in the certificate database. 14 |
A pointer to a CERTCertificate representing the certificate in the database that matched the derCert, or NULL if none was found. The certificate is a shallow copy, use CERT_DestroyCertificate to decrement the reference count on the certificate instance.
15 |
Occurrences of CERT_FindCertByDERCert in the current NSS source code (generated by LXR).
16 |
FC_OpenSession - open a session between an application and a token. 2 |
CK_RV FC_OpenSession( 3 | CK_SLOT_ID slotID, 4 | CK_FLAGS flags, 5 | CK_VOID_PTR pApplication, 6 | CK_NOTIFY Notify, 7 | CK_SESSION_HANDLE_PTR phSession 8 | ); 9 |
FC_OpenSession has the following parameters:
10 |
slotIDflagspApplication
13 | NotifyphSessionFC_OpenSession opens a session between an application and the token in the slot with the ID slotID.
16 |
The NSS cryptographic module currently doesn't call the surrender callback function Notify. (See PKCS #11 v2.20 section 11.17.1.)
17 |
A user may call FC_OpenSession without logging into the token (to assume the NSS User role).
18 |
FC_DecryptUpdate - decrypt a block of a multi-part encryption operation. 2 |
CK_RV FC_DecryptUpdate( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pEncryptedPart, 5 | CK_ULONG usEncryptedPartLen, 6 | CK_BYTE_PTR pPart, 7 | CK_ULONG_PTR pusPartLen 8 | ); 9 |
hSessionpEncryptedPartusEncryptedPartLenpPartpusPartLenFC_DecryptUpdate decrypts a block of data according to the attributes of the previous call to FC_DecryptInit. The block may be part of a multi-part decryption operation.
15 |
A user must log into the token (to assume the NSS User role) before calling FC_DecryptUpdate.
16 |
FC_EncryptUpdate - encrypt a block of a multi-part encryption operation. 2 |
CK_RV FC_EncryptUpdate( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pPart, 5 | CK_ULONG usPartLen, 6 | CK_BYTE_PTR pEncryptedPart, 7 | CK_ULONG_PTR pusEncryptedPartLen 8 | ); 9 |
hSessionpPartusPartLenpEncryptedPartpusEncryptedPartaLenFC_EncryptUpdate encrypts a block of data according to the attributes of the previous call to FC_EncryptInit. The block may be part of a multi-part encryption operation.
15 |
A user must log into the token (to assume the NSS User role) before calling FC_EncryptUpdate.
16 |
Network Security Services (NSS) 3.37.3 is a patch release for NSS 3.37.
The HG tag is NSS_3_37_3_RTM. NSS 3.37.3 requires NSPR 4.19 or newer.
2 | 3 |NSS 3.37.3 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |No new functionality is introduced in this release. This is a patch release to fix regression bugs.
Bug 1459739 - Fix build on armv6/armv7 and other platforms.
11 |Bug 1461731 - Fix crash on macOS related to authentication tokens, e.g. PK11or WebAuthn.
14 |NSS 3.37.3 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.37.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
FC_SignEncryptUpdate - continue a multi-part signing and encryption operation 2 |
CK_RV FC_SignEncryptUpdate( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pPart, 5 | CK_ULONG ulPartLen, 6 | CK_BYTE_PTR pEncryptedPart, 7 | CK_ULONG_PTR pulEncryptedPartLen 8 | ); 9 |
hSessionpPartulPartLenpEncryptedPartpulEncryptedPartLenFC_SignEncryptUpdate continues a multi-part signature and encryption operation. After calling both FC_SignInit and FC_EncryptInit to set up the operations this function may be called multiple times. The operation is finished by calls to FC_SignFinal and FC_EncryptFinal.
15 |
A user must log into the token (to assume the NSS User role) before calling FC_SignEncryptUpdate.
16 |
FC_WrapKey - wrap a key 2 |
CK_RV FC_WrapKey( 3 | CK_SESSION_HANDLE hSession, 4 | CK_MECHANISM_PTR pMechanism, 5 | CK_OBJECT_HANDLE hWrappingKey, 6 | CK_OBJECT_HANDLE hKey, 7 | CK_BYTE_PTR pWrappedKey, 8 | CK_ULONG_PTR pusWrappedKeyLen 9 | ); 10 |
hSessionpMechanismhWrappingKeyhKeypWrappedKeypusWrappedKeyLenFC_WrapKey wraps (encrypts) a key. If pWrappedKey is NULL the length of the wrapped key is returned in pusWrappedKeyLen and FC_WrapKey may be called again with pWrappedKey set to retrieve the wrapped key.
17 |
A user must log into the token (to assume the NSS User role) before calling FC_WrapKey.
18 |
FC_DecryptDigestUpdate - continue a multi-part decrypt and digest operation 2 |
CK_RV FC_DecryptDigestUpdate( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pEncryptedPart, 5 | CK_ULONG ulEncryptedPartLen, 6 | CK_BYTE_PTR pPart, 7 | CK_ULONG_PTR pulPartLen 8 | ); 9 |
hSessionpEncryptedPartulEncryptedPartLenpPartpulPartLenFC_DecryptDigestUpdate continues a multi-part decrypt and digest operation. After calling both FC_DecryptInit and FC_DigestInit to set up the operations this function may be called multiple times. The operation is finished by calls to FC_DigestFinal and FC_DecryptFinal.
15 |
A user must log into the token (to assume the NSS User role) before calling FC_DecryptDigestUpdate.
16 |
FC_DigestEncryptUpdate - continue a multi-part digest and encryption operation 2 |
CK_RV FC_DigestEncryptUpdate( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pPart, 5 | CK_ULONG ulPartLen, 6 | CK_BYTE_PTR pEncryptedPart, 7 | CK_ULONG_PTR pulEncryptedPartLen 8 | ); 9 |
hSessionpPartulPartLenpEncryptedPartpulEncryptedPartLenFC_DigestEncryptUpdate continues a multi-part digest and encryption operation. After calling both FC_DigestInit and FC_EncryptInit to set up the operations this function may be called multiple times. The operation is finished by calls to FC_DigestFinal and FC_EncryptFinal in that order.
15 |
A user must log into the token (to assume the NSS User role) before calling FC_DigestEncryptUpdate.
16 |
2 | One-line description of what the function does (more than just what it returns). 3 |
#include <headers.h> 4 | ReturnType Function_Name( 5 | 6 | ParamType ParamName, 7 | ParamType ParamName, ); 8 |
ParamName | Sample: in pointer to a CERTCertDBHandle representing the certificate database to look in |
ParamName | Sample: in pointer to an SECItem whose type must be siDERCertBuffer and whose data contains a DER-encoded certificate |
Long description of this function, what it does, and why you would use it. Describe all side-effects on "out" parameters. Avoid describing the return until the next section, for example: 11 |
This function looks in the NSSCryptoContext and the NSSTrustDomain to find 12 | the certificate that matches the DER-encoded certificate. A match is found 13 | when the issuer and serial number of the DER-encoded certificate are found on 14 | a certificate in the certificate database. 15 |
Full description of the return value, for example: 16 |
A pointer to a CERTCertificate representing the certificate in the database that matched the derCert, or NULL if none was found. The certificate is a shallow copy, use CERT_DestroyCertificate to decrement the reference count on the certificate instance.
17 |
Copy of the MXR link, with the following text 18 |
Occurrences of Function_Name in the current NSS source code (generated by MXR).
19 |
Network Security Services (NSS) 3.63.1 was released on 6 April 2021.
The HG tag is NSS_3_63_1_RTM. NSS 3.63.1 requires NSPR 4.30 or newer.
2 | 3 |NSS 3.63.1 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |Other releases are available in NSS Releases.
NSS 3.63.1 shared libraries are backwards-compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.63.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report on bugzilla.mozilla.org (product NSS).
This version of NSS contains a minor update to the root CAs due to a delay in deprecation.
13 | 14 |This revert is temporary in order to prevent breaking websites with Firefox 88 and the change has been reinstated in NSS 3.64 for Firefox 89.
FC_DecryptVerifyUpdate - continue a multi-part decrypt and verify operation 2 |
CK_RV FC_DecryptVerifyUpdate( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pEncryptedData, 5 | CK_ULONG ulEncryptedDataLen, 6 | CK_BYTE_PTR pData, 7 | CK_ULONG_PTR pulDataLen 8 | ); 9 |
hSessionpEncryptedDataulEncryptedDataLenpDatapulDataLenFC_DecryptVerifyUpdate continues a multi-part decryption and signature verification operation. After calling both FC_DecryptInit and FC_VerifyInit to set up the operations this function may be called multiple times. The operation is finished by calls to FC_DecryptFinal and FC_VerifyFinal.
15 |
16 |
A user must log into the token (to assume the NSS User role) before calling FC_DecryptVerifyUpdate.
17 |
This chapter describes two functions used to manipulate private keys and key databases such as the key3.db database provided with NSS. This was converted from "Chapter 6: Key Functions".
2 |Returns a handle to the default key database opened by NSS_Init.
9 |Syntax
10 |SECKEYKeyDBHandle *SECKEY_GetDefaultKeyDB(void);
15 |Returns The function returns a handle of type SECKEYKeyDBHandle.
16 |Description NSS_Init opens the certificate, key, and security module databases that you specify for use with NSS. SECKEYKeyDBHandle returns a handle to the key database opened by NSS_Init.
17 |Destroys a private key structure.
19 |Syntax
20 |void SECKEY_DestroyPrivateKey(SECKEYPrivateKey *key);
25 |Parameter This function has the following parameter:
26 |key
27 |A pointer to the private key structure to destroy.
28 |Description Certificate and key structures are shared objects. When an application makes a copy of a particular certificate or key structure that already exists in memory, SSL makes a shallow copy--that is, it increments the reference count for that object rather than making a whole new copy. When you call CERT_DestroyCertificate or SECKEY_DestroyPrivateKey, the function decrements the reference count and, if the reference count reaches zero as a result, both frees the memory and sets all the bits to zero. The use of the word "destroy" in function names or in the description of a function implies reference counting.
29 |Never alter the contents of a certificate or key structure. If you attempt to do so, the change affects all the shallow copies of that structure and can cause severe problems.
FC_GetSessionInfo - obtain information about a session. 2 |
CK_RV FC_GetSessionInfo( 3 | CK_SESSION_HANDLE hSession, 4 | CK_SESSION_INFO_PTR pInfo 5 | ); 6 |
hSessionpInfoFC_GetSessionInfo obtains information about a session. A user may call FC_GetSessionInfo without logging into the token (to assume the NSS User role).
9 |
If the NSS cryptographic module is in the error state, FC_GetSessionInfo returns CKR_DEVICE_ERROR. Otherwise, it fills in the CK_SESSION_INFO structure with the following information:
10 |
state: the state of the session, i.e., no role is assumed, the User role is assumed, or the Crypto Officer role is assumed
12 | flags: bit flags that define the type of session
13 | CKF_RW_SESSION (0x00000002): true if the session is read/write; false if the session is read-only.
14 | CKF_SERIAL_SESSION (0x00000004): this flag is provided for backward compatibility and is always set to true.
15 | Network Security Services (NSS) 3.22.3 is a patch release for NSS 3.22. The bug fixes in NSS 3.22.3 are described in the "Bugs fixed" section below.
The HG tag is NSS_3_22_3_RTM. NSS 3.22.3 requires NSPR 4.12 or newer.
2 | 3 |NSS 3.22.3 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |No new functionality is introduced in this release.
NSS 3.22.3 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.22.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
Network Security Services (NSS) 3.22.1 is a patch release for NSS 3.22. The bug fixes in NSS 3.22.1 are described in the "Notable Changes" section below.
The HG tag is NSS_3_22_1_RTM. NSS 3.22.1 requires NSPR 4.12 or newer.
2 | 3 |NSS 3.22.1 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |No new functionality is introduced in this release.
NSS 3.22.1 shared libraries are backward compatible with all older NSS 3.22 shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.22.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
This is a DRAFT document. This notice will be removed when completed.
3 |The Network Security Services (NSS) team has released NSS 3.31.1, which is a patch release for NSS 3.31.
The hg tag is NSS_3_31_1_RTM. NSS 3.31.1 requires Netscape Portable Runtime (NSPR) 4.15, or newer.
4 | 5 |NSS 3.31.1 source distributions are available on ftp.mozilla.org for secure HTTPS download:
6 | 7 |No new functionality is introduced in this release.
NSS 3.31.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.31.1 shared libraries, without recompiling, or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
Network Security Services (NSS) 3.36.5 is a patch release for NSS 3.36. The bug fixes in NSS 3.36.5 are described in the "Bugs Fixed" section below.
The HG tag is NSS_3_36_5_RTM. NSS 3.36.5 requires NSPR 4.19 or newer.
2 | 3 |NSS 3.36.5 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |No new functionality is introduced in this release. This is a patch release to fix CVE-2018-12384
Bug 1483128 - NSS responded to an SSLv2-compatible ClientHello with a ServerHello that had an all-zero random (CVE-2018-12384)
NSS 3.36.5 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.36.5 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
Network Security Services (NSS) 3.29.3 is a patch release for NSS 3.29. The bug fixes in NSS 3.29.3 are described in the "Bugs Fixed" section below.
The HG tag is NSS_3_29_3_RTM. NSS 3.29.3 requires NSPR 4.13.1 or newer.
2 | 3 |NSS 3.29.3 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |No new functionality is introduced in this release.
NSS 3.29.3 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.29.3 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
FC_Finalize - indicate that an application is done with the PKCS #11 library. 2 |
CK_RV FC_Finalize (CK_VOID_PTR pReserved); 3 |
FC_Finalize has one parameter:
4 |
pReservedNULL
6 | FC_Finalize shuts down the NSS cryptographic module in the FIPS mode of operation. If the library is not initialized, it does nothing.
7 |
The pReserved argument is not used and must be NULL.
8 |
FC_Finalize always returns CKR_OK.
9 |
FC_Finalize should check the pReserved argument and return CKR_ARGUMENTS_BAD if pReserved is not NULL.
12 |
FC_Finalize should return CKR_CRYPTOKI_NOT_INITIALIZED if the library is not initialized.
13 |
#include <assert.h> 15 | 16 | CK_FUNCTION_LIST_PTR pFunctionList; 17 | CK_RV crv; 18 | 19 | crv = FC_GetFunctionList(&pFunctionList); 20 | assert(crv == CKR_OK); 21 | 22 | ... 23 | 24 | /* invoke FC_Finalize as pFunctionList->C_Finalize */ 25 | crv = pFunctionList->C_Finalize(NULL); 26 |
The NSS team has released Network Security Services (NSS) 3.52.1 on 19 May 2020. This is a security patch release.
2 | 3 |Thank you to Cesar Pereida Garcia and the Network and Information Security Group (NISEC) at Tampere University for reporting this issue.
The HG tag is NSS_3_52_1_RTM. NSS 3.52.1 requires NSPR 4.25 or newer.
4 | 5 |NSS 3.52.1 source distributions are available on ftp.mozilla.org for secure HTTPS download:
6 | 7 |Other releases are available in NSS Releases.
No new functionality is introduced in this release.
NSS 3.52.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.52.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
FC_SetOperationState - restore the cryptographic operation state of a session. 2 |
CK_RV FC_SetOperationState( 3 | CK_SESSION_HANDLE hSession, 4 | CK_BYTE_PTR pOperationState, 5 | CK_ULONG ulOperationStateLen, 6 | CK_OBJECT_HANDLE hEncryptionKey, 7 | CK_OBJECT_HANDLE hAuthenticationKey 8 | ); 9 |
hSessionpOperationStateulOperationStateLenhEncryptionKeyhAuthenticationKeyFC_SetOperationState restores the cryptographic operations state of a session from an array of bytes obtained with FC_GetOperationState. This function only works for digest operations for now. Therefore, a user may call FC_SetOperationState without logging into the token (to assume the NSS User role).
15 |
Network Security Services (NSS) 3.21.2 is a security patch release for NSS 3.21.1. The bug fixes in NSS 3.21.2 are described in the "Security Fixes" section below.
The HG tag is NSS_3_21_2_RTM. NSS 3.21.2 requires NSPR 4.10.10 or newer.
2 | 3 |NSS 3.21.2 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |No new functionality is introduced in this release.
NSS 3.21.2 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.21.2 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
The following SSL functions have been replaced with newer versions. The deprecated functions are not supported by the new SSL shared libraries. Applications that want to use the SSL shared libraries must convert to calling the new replacement functions listed below.
2 |Each function name is linked to its entry in the old SSL Reference. The Mozilla Cross Reference (MXR) link for each function provides access to the function definition, prototype definition, and source code references.
3 || Function name/documentation | 7 |Source code | 8 |Replacement in NSS 3.2 | 9 |
|---|---|---|
SSL_Enable |
12 | MXR | 13 |SSL_OptionSet |
14 |
SSL_EnableCipher |
17 | MXR | 18 |SSL_CipherPrefSetDefault |
19 |
SSL_EnableDefault |
22 | MXR | 23 |SSL_OptionSetDefault |
24 |
SSL_RedoHandshake |
27 | MXR | 28 |SSL_ReHandshake |
29 |
SSL_SetPolicy |
32 | MXR | 33 |SSL_CipherPolicySet |
34 |
The NSS team has released Network Security Services (NSS) 3.53.1 on 16 June 2020. This is a security patch release.
2 | 3 |Thank you to Sohaib ul Hassan, Billy Bob Brumley, and the Network and Information Security Group (NISEC) at Tampere University for reporting this issue and providing a patch.
The HG tag is NSS_3_53_1_RTM. NSS 3.53.1 requires NSPR 4.25 or newer.
4 | 5 |NSS 3.53.1 source distributions are available on ftp.mozilla.org for secure HTTPS download:
6 | 7 |Other releases are available in NSS Releases.
No new functionality is introduced in this release.
NSS 3.53.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.53.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
The NSS team has released Network Security Services (NSS) 3.44.4 on 19 May 2020. This is a security patch release.
2 | 3 |Thank you to Cesar Pereida Garcia and the Network and Information Security Group (NISEC) at Tampere University for reporting this issue.
The HG tag is NSS_3_44_4_RTM. NSS 3.44.4 requires NSPR 4.21 or newer.
4 | 5 |NSS 3.44.4 source distributions are available on ftp.mozilla.org for secure HTTPS download:
6 | 7 |Other releases are available in NSS Releases.
No new functionality is introduced in this release.
CVE-2020-12399 - Force a fixed length for DSA exponentiation
14 |NSS 3.44.4 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.44.4 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
Network Security Services (NSS) 3.64 was released on 15 April 2021.
The HG tag is NSS_3_64_RTM. NSS 3.64 requires NSPR 4.30 or newer.
2 | 3 |NSS 3.64 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |Other releases are available in NSS Releases.
NSS 3.64 shared libraries are backwards-compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.64 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report on bugzilla.mozilla.org (product NSS).
This version of NSS contains a number of contributions for "unsupported platforms". We would like to thank the authors and the reviewers for their contributions to NSS.
16 | 17 |Discussions about moving the documentation are still ongoing. (See discussion in the 3.62 release notes.)
Network Security Services (NSS) 3.30.1 is a security patch release for NSS 3.30. The bug fixes in NSS 3.30.1 are described in the "Bugs Fixed" section below.
The HG tag is NSS_3_30_1_RTM. NSS 3.30.1 requires NSPR 4.14 or newer.
2 | 3 |NSS 3.30.1 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |No new functionality is introduced in this release.
The NSS development team would like to thank Ronald Crane for responsibly disclosing the issue by providing advance copies of their research.
NSS 3.30.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.30.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
The NSS team has released Network Security Services (NSS) 3.40.1, which is a patch release for NSS 3.40
The HG tag is NSS_3_40_1_RTM. NSS 3.40.1 requires NSPR 4.20 or newer.
2 | 3 |NSS 3.40 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |No new functionality is introduced in this release. This is a patch release to fix CVE-2018-12404
11 |Bug 1485864 - Cache side-channel variant of the Bleichenbacher attack (CVE-2018-12404)
23 |NSS 3.40.1 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.40.1 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
Network Security Services (NSS) 3.36.6 is a patch release for NSS 3.36. The bug fixes in NSS 3.36.6 are described in the "Bugs Fixed" section below.
The HG tag is NSS_3_36_6_RTM. NSS 3.36.6 requires NSPR 4.19 or newer.
2 | 3 |NSS 3.36.6 source distributions are available on ftp.mozilla.org for secure HTTPS download:
4 | 5 |No new functionality is introduced in this release. This is a patch release to fix CVE-2018-12404
Bug 1485864 - Cache side-channel variant of the Bleichenbacher attack (CVE-2018-12404)
9 | 10 |Bug 1389967 and Bug 1448748 - Fixes for MinGW on x64 platforms.
NSS 3.36.6 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x shared libraries will work with NSS 3.36.6 shared libraries without recompiling or relinking. Furthermore, applications that restrict their use of NSS APIs to the functions listed in NSS Public Functions will remain compatible with future versions of the NSS shared libraries.
Bugs discovered should be reported by filing a bug report with bugzilla.mozilla.org (product NSS).
PKCS #11 modules are external modules which add to Firefox support for smartcard readers, biometric security devices, and external certificate stores. This article covers the two methods for installing PKCS #11 modules into Firefox. Users can use the preferences dialog to install or remove PKCS #11 module. Extensions can programmatically manage PKCS #11 modules using the nsIPKCS11 programming interface.
2 | 3 |Starting with Firefox 58, extensions can use the pkcs11 browser extension API to enumerate PKCS #11 modules and make them accessible to the browser as sources of keys and certificates.
pkcs11.installModule()pkcs11.isModuleInstalled()FC_InitPIN() - Initialize the user's PIN.
2 |
CK_RV FC_InitPIN( 3 | CK_SESSION_HANDLE hSession, 4 | CK_CHAR_PTR pPin, 5 | CK_ULONG ulPinLen 6 | ); 7 |
FC_InitPIN() takes three parameters:
8 |
hSessionpPinulPinLen
12 | FC_InitPIN() initializes the normal user's PIN.
14 |
FC_InitPIN() must be called when the PKCS #11 Security Officer (SO) is logged into the token and the session is read/write, that is, the session must be in the "R/W SO Functions" state (CKS_RW_SO_FUNCTIONS). The role of the PKCS #11 SO is to initialize a token and to initialize the normal user's PIN. In the NSS cryptographic module, one uses the empty string password ("") to log in as the PKCS #11 SO. The module only allows the PKCS #11 SO to log in if the normal user's PIN has not yet been set or has been reset.
15 |
FC_InitPIN() returns the following return codes.
16 |
CKR_OK: normal user's PIN initialization succeeded.
18 | CKR_SESSION_HANDLE_INVALID: the session handle is invalid.
19 | CKR_USER_NOT_LOGGED_IN: the session is not in the "R/W SO Functions" state.
20 | CKR_PIN_INVALID: the PIN has an invalid UTF-8 character.
21 | CKR_PIN_LEN_RANGE: the PIN is too short, too long, or too weak (doesn't have enough character types).
22 | CKR_DEVICE_ERROR: normal user's PIN is already initialized.
23 | 2 | Find a certificate in the database with the given issuer and serial number. 3 |
#include <cert.h> 4 | CERTCertificate *CERT_FindCertByIssuerAndSN ( 5 | 6 | CERTCertDBHandle *handle, 7 | CERTIssuerAndSN *issuerAndSN ); 8 |
handle | in pointer to a CERTCertDBHandle representing the certificate database to look in |
issuerAndSN | in pointer to a CERTIssuerAndSN that must be properly formed to contain the issuer name and the serial number (see [Example]) |
This function creates a certificate key using the issuerAndSN and it then
11 | uses the key to find the matching certificate in the database.
12 |
A pointer to a CERTCertificate representing the certificate in the database that matched the issuer and serial number, or NULL if none was found. The certificate is a shallow copy, use CERT_DestroyCertificate to decrement the reference count on the certificate instance.
13 |
CERTIssuerAndSN issuerSN;
14 | issuerSN.derIssuer.data = caName->data;
15 | issuerSN.derIssuer.len = caName->len;
16 | issuerSN.serialNumber.data = authorityKeyID->authCertSerialNumber.data;
17 | issuerSN.serialNumber.len = authorityKeyID->authCertSerialNumber.len;
18 | issuerCert = CERT_FindCertByIssuerAndSN(cert->dbhandle, &issuerSN);
19 | if ( issuerCert == NULL ) {
20 | PORT_SetError (SEC_ERROR_UNKNOWN_ISSUER);
21 | }
22 | Occurrences of CERT_FindCertByIssuerAndSN in the current NSS source code (generated by LXR).
23 |
FC_UnwrapKey - unwrap a key 2 |
CK_RV FC_UnwrapKey( 3 | CK_SESSION_HANDLE hSession, 4 | CK_MECHANISM_PTR pMechanism, 5 | CK_OBJECT_HANDLE hUnwrappingKey, 6 | CK_BYTE_PTR pWrappedKey, 7 | CK_ULONG usWrappedKeyLen, 8 | CK_ATTRIBUTE_PTR pTemplate, 9 | CK_ULONG usAttributeCount, 10 | CK_OBJECT_HANDLE_PTR phKey 11 | ); 12 |
hSessionpMechanismhUnwrappingKeypWrappedKeyusWrappedKeyLenpTemplateusAttributeCountphKeyFC_UnwrapKey unwraps (decrypts) a key and creates a new key opbject. If pWrappedKey is NULL the length of the wrapped key is returned in pusWrappedKeyLen and FC_UnwrapKey may be called again with pWrappedKey set to retrieve the wrapped key.
21 |
A user must log into the token (to assume the NSS User role) before calling FC_UnwrapKey.
22 |
The NSS team has released Network Security Services (NSS) 3.17, which is a minor release.
The HG tag is NSS_3_17_RTM. NSS 3.17 requires NSPR 4.10.7 or newer.
2 |NSS 3.17 source distributions are available on ftp.mozilla.org for secure HTTPS download:
3 |New Macros
10 |This Bugzilla query returns all the bugs fixed in NSS 3.17:
20 |