Visit Mozilla.org

NSS functions

From MDC

This page lists all exported functions in NSS 3.11.7 It was ported from here.

This is a composite page. Section headings are links to the individual pages where you can edit them.

Keywords:

  • Deprecated - function should no longer be used.
  • Updated - function has new arguments such as new flag or addition to structure.

Contents


SSL functions

The public functions listed here are used to configure sockets for communication via the SSL and TLS protocols. In addition to the functions listed here, applications that support SSL use some of the Certificate functions, Crypto functions, and Utility functions described below on this page.

Other sources of information:

  • The NSS_reference documents the functions most commonly used by applications to support SSL.
  • The NSS home page links to additional SSL documentation.

If documentation is available for a function listed below, the function name is linked to either its MDC wiki page or its entry in the old SSL Reference. The Mozzila Cross Reference (MXR) link for each function provides access to the function definition, prototype definition, and source code references. The NSS version column indicates which versions of NSS support the function.


Function name/documentation Source code NSS versions
NSS_GetClientAuthData MXR 3.2 and later
NSS_SetDomesticPolicy MXR 3.2 and later
NSS_SetExportPolicy MXR 3.2 and later
NSS_SetFrancePolicy MXR 3.2 and later
NSSSSL_VersionCheck MXR 3.2.1 and later
SSL_AuthCertificate MXR 3.2 and later
SSL_AuthCertificateHook MXR 3.2 and later
SSL_BadCertHook MXR 3.2 and later
SSL_CertDBHandleSet MXR 3.2 and later
SSL_Canbypass MXR 3.11.7 and later
SSL_CipherPolicyGet MXR 3.2 and later
SSL_CipherPolicySet MXR 3.2 and later
SSL_CipherPrefGet MXR 3.2 and later
SSL_CipherPrefGetDefault MXR 3.2 and later
SSL_CipherPrefSet MXR 3.2 and later
SSL_CipherPrefSetDefault MXR 3.2 and later
SSL_ClearSessionCache MXR 3.2 and later
SSL_ConfigMPServerSIDCache MXR 3.2 and later
SSL_ConfigSecureServer MXR 3.2 and later
SSL_ConfigServerSessionIDCache MXR 3.2 and later
SSL_DataPending MXR 3.2 and later
SSL_ForceHandshake MXR 3.2 and later
SSL_ForceHandshakeWithTimeout MXR 3.11.4 and later
SSL_GetChannelInfo MXR 3.4 and later
SSL_GetCipherSuiteInfo MXR 3.4 and later
SSL_GetClientAuthDataHook MXR 3.2 and later
SSL_GetMaxServerCacheLocks MXR 3.4 and later
SSL_GetSessionID MXR 3.2 and later
SSL_GetStatistics MXR 3.2 and later
SSL_HandshakeCallback MXR 3.2 and later
SSL_ImportFD MXR 3.2 and later
SSL_InheritMPServerSIDCache MXR 3.2 and later
SSL_InvalidateSession MXR 3.2 and later
SSL_LocalCertificate MXR 3.4 and later
SSL_OptionGet MXR 3.2 and later
SSL_OptionGetDefault MXR 3.2 and later
SSL_OptionSet MXR 3.2 and later
SSL_OptionSetDefault MXR 3.2 and later
SSL_PeerCertificate MXR 3.2 and later
SSL_PreencryptedFileToStream MXR 3.2 and later
SSL_PreencryptedStreamToFile MXR 3.2 and later
SSL_ReHandshake MXR 3.2 and later
SSL_ReHandshakeWithTimeout MXR 3.11.4 and later
SSL_ResetHandshake MXR 3.2 and later
SSL_RestartHandshakeAfterCertReq MXR 3.2 and later
SSL_RestartHandshakeAfterServerCert MXR 3.2 and later
SSL_RevealCert MXR 3.2 and later
SSL_RevealPinArg MXR 3.2 and later
SSL_RevealURL MXR 3.2 and later
SSL_SecurityStatus MXR 3.2 and later
SSL_SetMaxServerCacheLocks MXR 3.4 and later
SSL_SetPKCS11PinArg MXR 3.2 and later
SSL_SetSockPeerID MXR 3.2 and later
SSL_SetURL MXR 3.2 and later
SSL_ShutdownServerSessionIDCache MXR 3.7.4 and later

Deprecated SSL functions

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.

Each function name is linked to its entry in the old SSL Reference. The Mozzila Cross Reference (MXR) link for each function provides access to the function definition, prototype definition, and source code references.

Function name/documentation Source code Replacement in NSS 3.2
SSL_Enable MXR SSL_OptionSet
SSL_EnableCipher MXR SSL_CipherPrefSetDefault
SSL_EnableDefault MXR SSL_OptionSetDefault
SSL_RedoHandshake MXR SSL_ReHandshake
SSL_SetPolicy MXR SSL_CipherPolicySet

Certificate functions

The public functions listed here are used to interact with certificate databases.

If documentation is available for a function listed below, the function name is linked to either its MDC wiki page or its entry in the old SSL Reference. The Mozzila Cross Reference (MXR) link for each function provides access to the function definition, prototype definition, and source code references. The NSS version column indicates which versions of NSS support the function.

Function name/documentation Source code NSS versions
CERT_AddCertToListTail MXR 3.2 and later
CERT_AddExtension MXR 3.5 and later
CERT_AddOCSPAcceptableResponses MXR 3.6 and later
CERT_AddOKDomainName MXR 3.4 and later
CERT_AddRDN MXR 3.2.1 and later
CERT_AsciiToName MXR 3.2 and later
CERT_CacheCRL MXR 3.10 and later
CERT_ClearOCSPCache MXR 3.11.7 and later
CERT_CertChainFromCert MXR 3.2 and later
CERT_CertListFromCert MXR 3.2 and later
CERT_CertTimesValid MXR 3.2 and later
CERT_ChangeCertTrust MXR 3.2 and later
CERT_CheckCertValidTimes MXR 3.2 and later
CERT_CheckNameSpace MXR 3.12 and later
CERT_CheckCertUsage MXR 3.3 and later
CERT_CompareName MXR 3.2 and later
CERT_CompareValidityTimes MXR 3.11 and later
CERT_CompleteCRLDecodeEntries MXR 3.6 and later
CERT_ConvertAndDecodeCertificate MXR 3.9.3 and later
CERT_CopyName MXR 3.4 and later
CERT_CopyRDN MXR 3.5 and later
CERT_CreateAVA MXR 3.2.1 and later
CERT_CreateCertificate MXR 3.5 and later
CERT_CreateCertificateRequest MXR 3.2 and later
CERT_CreateName MXR 3.2.1 and later
CERT_CreateOCSPCertID MXR 3.6 and later
CERT_CreateOCSPRequest MXR 3.6 and later
CERT_CreateRDN MXR 3.2.1 and later
CERT_CreateSubjectCertList MXR 3.4 and later
CERT_CreateValidity MXR 3.5 and later
CERT_CRLCacheRefreshIssuer MXR 3.7 and later
CERT_DecodeAltNameExtension MXR 3.10 and later
CERT_DecodeAuthInfoAccessExtension MXR 3.10 and later
CERT_DecodeAuthKeyID MXR 3.10 and later
CERT_DecodeAVAValue MXR 3.4 and later
CERT_DecodeBasicConstraintValue MXR 3.2 and later
CERT_DecodeCertFromPackage MXR 3.4 and later
CERT_DecodeCertificatePoliciesExtension MXR 3.2 and later
CERT_DecodeCertPackage MXR 3.2 and later
CERT_DecodeCRLDistributionPoints MXR 3.10 and later
CERT_DecodeDERCrl MXR 3.2 and later
CERT_DecodeDERCrlWithFlags MXR 3.6 and later
CERT_DecodeGeneralName MXR 3.4 and later
CERT_DecodeNameConstraintsExtension MXR 3.10 and later
CERT_DecodeOCSPResponse MXR 3.6 and later
CERT_DecodeOidSequence MXR 3.2 and later
CERT_DecodePrivKeyUsagePeriodExtension MXR 3.10 and later
CERT_DecodeTrustString MXR 3.4 and later
CERT_DecodeUserNotice MXR 3.2 and later
CERT_DerNameToAscii MXR 3.4 and later
CERT_DestroyCertArray MXR 3.2 and later
CERT_DestroyCertificate MXR 3.2 and later
CERT_DestroyCertificateList MXR 3.2 and later
CERT_DestroyCertificatePoliciesExtension MXR 3.2 and later
CERT_DestroyCertificateRequest MXR 3.2 and later
CERT_DestroyCertList MXR 3.2 and later
CERT_DestroyName MXR 3.2 and later
CERT_DestroyOCSPCertID MXR 3.6 and later
CERT_DestroyOCSPRequest MXR 3.6 and later
CERT_DestroyOCSPResponse MXR 3.7 and later
CERT_DestroyOidSequence MXR 3.9 and later
CERT_DestroyUserNotice MXR 3.10 and later
CERT_DestroyValidity MXR 3.5 and later
CERT_DupCertificate MXR 3.2 and later
CERT_DupCertList MXR 3.2 and later
CERT_EnableOCSPChecking MXR 3.2 and later
CERT_EncodeAltNameExtension MXR 3.7 and later
CERT_EncodeAndAddBitStrExtension MXR 3.5 and later
CERT_EncodeAuthKeyID MXR 3.5 and later
CERT_EncodeBasicConstraintValue MXR 3.5 and later
CERT_EncodeCertPoliciesExtension MXR 3.12 and later
CERT_EncodeCRLDistributionPoints MXR 3.5 and later
CERT_EncodeGeneralName MXR 3.4 and later
CERT_EncodeInfoAccessExtension MXR 3.12 and later
CERT_EncodeInhibitAnyExtension MXR 3.12 and later
CERT_EncodeNoticeReference MXR 3.12 and later
CERT_EncodeOCSPRequest MXR 3.6 and later
CERT_EncodePolicyConstraintsExtension MXR 3.12 and later
CERT_EncodePolicyMappingExtension MXR 3.12 and later
CERT_EncodeSubjectKeyID MXR 3.12 and later
CERT_EncodeUserNotice MXR 3.12 and later
CERT_ExtractPublicKey MXR 3.2 and later
CERT_FindCertByName MXR 3.2 and later
CERT_FindCRLEntryReasonExten MXR 3.12 and later
CERT_FindCRLNumberExten MXR 3.12 and later
CERT_FindNameConstraintsExten MXR 3.12 and later
CERT_FilterCertListByCANames MXR 3.4 and later
CERT_FilterCertListByUsage MXR 3.4 and later
CERT_FilterCertListForUserCerts MXR 3.6 and later
CERT_FindCertByDERCert MXR 3.2 and later
CERT_FindCertByIssuerAndSN MXR 3.2 and later
CERT_FindCertByNickname MXR 3.2 and later
CERT_FindCertByNicknameOrEmailAddr MXR 3.2 and later
CERT_FindCertBySubjectKeyID MXR 3.7 and later
CERT_FindCertExtension MXR 3.4 and later
CERT_FindCertIssuer MXR 3.3 and later
CERT_FindKeyUsageExtension MXR 3.4 and later
CERT_FindSMimeProfile MXR 3.2 and later
CERT_FindSubjectKeyIDExtension MXR 3.7 and later
CERT_FindUserCertByUsage MXR 3.4 and later
CERT_FindUserCertsByUsage MXR 3.4 and later
CERT_FinishCertificateRequestAttributes MXR 3.10 and later
CERT_FinishExtensions MXR 3.5 and later
CERT_FormatName MXR 3.2 and later
CERT_FreeDistNames MXR 3.2 and later
CERT_FreeNicknames MXR 3.2 and later
CERT_GetAVATag MXR 3.2 and later
CERT_GetCertChainFromCert MXR 3.4 and later
CERT_GetCertEmailAddress MXR 3.2 and later
CERT_GetCertificateNames MXR 3.10 and later
CERT_GetCertificateRequestExtensions MXR 3.10 and later
CERT_GetCertIssuerAndSN MXR 3.2 and later
CERT_GetCertNicknames MXR 3.2 and later
CERT_GetCertTrust MXR 3.2 and later
CERT_GetCertUid MXR 3.2 and later
CERT_GetClassicOCSPDisabledPolicy MXR 3.12 and later
CERT_GetClassicOCSPEnabledHardFailurePolicy MXR 3.12 and later
CERT_GetClassicOCSPEnabledSoftFailurePolicy MXR 3.12 and later
CERT_GetCommonName MXR 3.2 and later
CERT_GetCountryName MXR 3.2 and later
CERT_GetDBContentVersion MXR 3.2 and later
CERT_GetDefaultCertDB MXR 3.2 and later
CERT_GetDomainComponentName MXR 3.2 and later
CERT_GetFirstEmailAddress MXR 3.7 and later
CERT_GetLocalityName MXR 3.2 and later
CERT_GetNextEmailAddress MXR 3.7 and later
CERT_GetNextGeneralName MXR 3.10 and later
CERT_GetNextNameConstraint MXR 3.10 and later
CERT_GetOCSPResponseStatus MXR 3.6 and later
CERT_GetOCSPStatusForCertID MXR 3.6 and later
CERT_GetOidString MXR 3.9 and later
CERT_GetOrgName MXR 3.2 and later
CERT_GetOrgUnitName MXR 3.2 and later
CERT_GetOCSPAuthorityInfoAccessLocation MXR 3.4 and later
CERT_GetPKIXVerifyNistRevocationPolicy MXR 3.12 and later
CERT_GetPrevGeneralName MXR 3.10 and later
CERT_GetPrevNameConstraint MXR 3.10 and later
CERT_GetSlopTime MXR 3.2 and later
CERT_GetSSLCACerts MXR 3.2 and later
CERT_GetStateName MXR 3.2 and later
CERT_GetUsePKIXForValidation MXR 3.12 and later
CERT_GetValidDNSPatternsFromCert MXR 3.12 and later
CERT_GenTime2FormattedAscii MXR 3.2 and later
CERT_Hexify MXR 3.2 and later
CERT_ImportCAChain MXR 3.2 and later
CERT_ImportCerts MXR 3.2 and later
CERT_IsRootDERCert MXR 3.8 and later
CERT_IsUserCert MXR 3.6 and later
CERT_KeyFromDERCrl MXR 3.4 and later
CERT_MakeCANickname MXR 3.4 and later
CERT_MergeExtensions MXR 3.10 and later
CERT_NameToAscii MXR 3.2 and later
CERT_NewCertList MXR 3.2 and later
CERT_NewTempCertificate MXR 3.12 and later
CERT_NicknameStringsFromCertList MXR 3.4 and later
CERT_OpenCertDBFilename MXR 3.2 and later
CERT_OCSPCacheSettings MXR 3.11.7 and later
CERT_PKIXVerifyCert MXR 3.12 and later
CERT_RemoveCertListNode MXR 3.6 and later
CERT_RFC1485_EscapeAndQuote MXR 3.2 and later
CERT_SaveSMimeProfile MXR 3.2 and later
CERT_SetSlopTime MXR 3.2 and later
CERT_SetOCSPFailureMode MXR 3.11.7 and later
CERT_SetOCSPTimeout MXR 3.12 and later
CERT_SetUsePKIXForValidation MXR 3.12 and later
CERT_StartCertExtensions MXR 3.5 and later
CERT_StartCertificateRequestAttributes MXR 3.10 and later
CERT_StartCRLEntryExtensions MXR 3.10 and later
CERT_StartCRLExtensions MXR 3.10 and later
CERT_UncacheCRL MXR 3.10 and later
CERT_VerifyCertName MXR 3.2 and later
CERT_VerifyCACertForUsage MXR 3.6 and later
CERT_VerifyCert MXR 3.2 and later. If you need to verify for multiple usages use CERT_VerifyCertificate
CERT_VerifyCertificate MXR 3.6 and later
CERT_VerifyCertificateNow MXR 3.6 and later
CERT_VerifyCertNow MXR 3.2 and later. If you need to verify for multiple usages use CERT_VerifyCertificateNow
CERT_VerifyOCSPResponseSignature MXR 3.6 and later
CERT_VerifySignedData MXR 3.4 and later
CERT_VerifySignedDataWithPublicKey MXR 3.7 and later
CERT_VerifySignedDataWithPublicKeyInfo MXR 3.7 and later
NSS_CmpCertChainWCANames MXR 3.2 and later
NSS_FindCertKEAType MXR 3.2 and later

Cryptography functions

The public functions listed here perform cryptographic operations based on the PKCS #11 interface.

If documentation is available for a function listed below, the function name is linked to either its MDC wiki page or its entry in the old SSL Reference. The Mozzila Cross Reference (MXR) link for each function provides access to the function definition, prototype definition, and source code references. The NSS version column indicates which versions of NSS support the function.

Function name/documentation Source code NSS versions
PK11_AlgtagToMechanism MXR 3.2 and later
PK11_Authenticate MXR 3.2 and later
PK11_BlockData MXR 3.2 and later
PK11_ChangePW MXR 3.2 and later
PK11_CheckUserPassword MXR 3.2 and later
PK11_CipherOp MXR 3.2 and later
PK11_CloneContext MXR 3.2 and later
PK11_ConfigurePKCS11 MXR 3.2 and later
PK11_ConvertSessionPrivKeyToTokenPrivKey MXR 3.6 and later
PK11_ConvertSessionSymKeyToTokenSymKey MXR 3.6 and later
PK11_CopyTokenPrivKeyToSessionPrivKey MXR 3.11 and later
PK11_CreateContextBySymKey MXR 3.2 and later
PK11_CreateDigestContext MXR 3.2 and later
PK11_CreateGenericObject MXR 3.12 and later
PK11_CreateMergeLog MXR 3.12 and later
PK11_CreatePBEAlgorithmID MXR 3.2 and later
PK11_CreatePBEV2AlgorithmID MXR 3.12 and later
PK11_DeleteTokenPrivateKey MXR 3.4 and later
PK11_DeleteTokenPublicKey MXR 3.4 and later
PK11_DeleteTokenSymKey MXR 3.4 and later
PK11_Derive MXR 3.2 and later
PK11_DeriveWithFlags MXR 3.2 and later
PK11_DeriveWithFlagsPerm MXR 3.9 and later
PK11_DestroyContext MXR 3.2 and later
PK11_DestroyGenericObject MXR 3.9.2 and later
PK11_DestroyGenericObjects MXR 3.9.2 and later
PK11_DestroyMergeLog MXR 3.12 and later
PK11_DestroyObject MXR 3.2 and later
PK11_DestroyTokenObject MXR 3.2 and later
PK11_DigestBegin MXR 3.2 and later
PK11_DigestKey MXR 3.2 and later
PK11_DigestOp MXR 3.2 and later
PK11_DigestFinal MXR 3.2 and later
PK11_DoesMechanism MXR 3.2 and later
PK11_ExportEncryptedPrivateKeyInfo MXR 3.2 and later
PK11_ExportEncryptedPrivKeyInfo MXR 3.9 and later
PK11_ExportPrivateKeyInfo MXR 3.2 and later
PK11_Finalize MXR 3.2 and later
PK11_FindBestKEAMatch MXR 3.2 and later
PK11_FindCertAndKeyByRecipientList MXR 3.2 and later
PK11_FindCertAndKeyByRecipientListNew MXR 3.2 and later
PK11_FindCertByIssuerAndSN MXR 3.2 and later
PK11_FindCertFromDERCert MXR 3.2 and later
PK11_FindCertFromNickname MXR 3.2 and later
PK11_FindCertInSlot MXR 3.2 and later
PK11_FindGenericObjects MXR 3.9.2 and later
PK11_FindFixedKey MXR 3.2 and later
PK11_FindKeyByAnyCert MXR 3.2 and later
PK11_FindKeyByDERCert MXR 3.2 and later
PK11_FindPrivateKeyFromCert MXR 3.2 and later
PK11_FindSlotByName MXR 3.2 and later
PK11_FindSlotsByNames MXR 3.9 and later
PK11_FortezzaHasKEA MXR 3.2 and later
PK11_FortezzaMapSig MXR 3.2 and later
PK11_FreeSlot MXR 3.2 and later
PK11_FreeSlotList MXR 3.2 and later
PK11_FreeSlotListElement MXR 3.11 and later
PK11_FreeSymKey MXR 3.2 and later
PK11_GenerateFortezzaIV MXR 3.2 and later
PK11_GenerateKeyPair MXR 3.2 and later
PK11_GenerateKeyPairWithFlags MXR 3.10.2 and later
PK11_GenerateKeyPairWithOpFlags MXR 3.12 and later
PK11_GenerateNewParam MXR 3.2 and later
PK11_GenerateRandom MXR 3.2 and later
PK11_GenerateRandomOnSlot MXR 3.11 and later
PK11_GetAllTokens MXR 3.2 and later
PK11_GetAllSlotsForCert MXR 3.12 and later
PK11_GetBestKeyLength MXR 3.2 and later
PK11_GetBestSlot MXR 3.2 and later
PK11_GetBestSlotMultiple MXR 3.2 and later
PK11_GetBestWrapMechanism MXR 3.2 and later
PK11_GetBlockSize MXR 3.2 and later
PK11_GetCertFromPrivateKey MXR 3.9.3 and later
PK11_GetCurrentWrapIndex MXR 3.2 and later
PK11_GetDefaultArray MXR 3.8 and later
PK11_GetDefaultFlags MXR 3.8 and later
PK11_GetDisabledReason MXR 3.8 and later
PK11_GetFirstSafe MXR 3.2 and later
PK11_GetInternalKeySlot MXR 3.2 and later
PK11_GetInternalSlot MXR 3.2 and later
PK11_GetKeyGen MXR 3.4 and later
PK11_GetKeyLength MXR 3.2 and later
PK11_GetKeyStrength MXR 3.2 and later
PK11_GetMechanism MXR 3.2 and later
PK11_GetMinimumPwdLength MXR 3.4 and later
PK11_GetModInfo MXR 3.6 and later
PK11_GetModule MXR 3.3 and later
PK11_GetModuleID MXR 3.2 and later
PK11_GetNextGenericObject MXR 3.9.2 and later
PK11_GetNextSafe MXR 3.4 and later
PK11_GetNextSymKey MXR 3.4 and later
PK11_GetPadMechanism MXR 3.4 and later
PK11_GetPBECryptoMechanism MXR 3.12 and later
PK11_GetPBEIV MXR 3.6 and later
PK11_GetPQGParamsFromPrivateKey MXR 3.4 and later
PK11_GetPrevGenericObject MXR 3.9.2 and later
PK11_GetPrivateKeyNickname MXR 3.4 and later
PK11_GetPrivateModulusLen MXR 3.2 and later
PK11_GetPublicKeyNickname MXR 3.4 and later
PK11_GetSlotFromKey MXR 3.2 and later
PK11_GetSlotFromPrivateKey MXR 3.2 and later
PK11_GetSlotID MXR 3.2 and later
PK11_GetSlotInfo MXR 3.4 and later
PK11_GetSlotName MXR 3.2 and later
PK11_GetSlotSeries MXR 3.2 and later
PK11_GetSymKeyNickname MXR 3.4 and later
PK11_GetSymKeyType MXR 3.9 and later
PK11_GetSymKeyUserData MXR 3.11 and later
PK11_GetTokenInfo MXR 3.2 and later
PK11_GetTokenName MXR 3.2 and later
PK11_GetWindow MXR 3.2 and later
PK11_GetWrapKey MXR 3.2 and later
PK11_HashBuf MXR 3.2 and later
PK11_HasRootCerts MXR 3.4 and later
PK11_ImportCert MXR 3.5 and later
PK11_ImportCertForKeyToSlot MXR 3.2 and later
PK11_ImportCRL MXR 3.6 and later
PK11_ImportDERCert MXR 3.6 and later
PK11_ImportDERPrivateKeyInfoAndReturnKey MXR 3.4 and later
PK11_ImportEncryptedPrivateKeyInfo MXR 3.2 and later
PK11_ImportPrivateKeyInfo MXR 3.2 and later
PK11_ImportPrivateKeyInfoAndReturnKey MXR 3.4 and later
PK11_ImportPublicKey MXR 3.4 and later
PK11_ImportSymKeyWithFlags