tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

index.rst (10846B)


      1 .. _mozilla_projects_nss_reference:
      2 
      3 NSS reference
      4 =============
      5 
      6 .. _initial_notes:
      7 
      8 `Initial Notes <#initial_notes>`__
      9 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     10 
     11 .. container::
     12 
     13   .. container:: notecard note
     14 
     15      -  We are migrating the :ref:`mozilla_projects_nss_ssl_functions_old_ssl_reference` into the
     16         format described in the `MDN Style
     17         Guide <https://developer.mozilla.org/en-US/docs/MDN/Guidelines>`__. If you are inclined to
     18         help with this migration, your help would be very much appreciated.
     19 
     20      -  The proposed chapters below are based on the chapters of the
     21         :ref:`mozilla_projects_nss_ssl_functions_old_ssl_reference` and the categories of functions
     22         in :ref:`mozilla_projects_nss_reference_nss_functions`.
     23 
     24      -  Should a particular page require the use of an underscore, please see the documentation for
     25         the `Title Override Extension </Project:En/MDC_style_guide#Title_Override_Extension>`__.
     26 
     27 .. _building_and_installing_nss:
     28 
     29 `Building and installing NSS <#building_and_installing_nss>`__
     30 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     31 
     32 .. container::
     33 
     34   :ref:`mozilla_projects_nss_reference_building_and_installing_nss`
     35 
     36 .. _overview_of_an_nss_application:
     37 
     38 `Overview of an NSS application <#overview_of_an_nss_application>`__
     39 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     40 
     41 .. container::
     42 
     43   Based on :ref:`mozilla_projects_nss_ssl_functions_sslintro` in the SSL Reference.
     44 
     45 .. _getting_started_with_nss:
     46 
     47 `Getting started with NSS <#getting_started_with_nss>`__
     48 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     49 
     50 .. container::
     51 
     52   Based on :ref:`mozilla_projects_nss_ssl_functions_gtstd` in the SSL Reference.
     53 
     54 .. _data_types:
     55 
     56 `Data types <#data_types>`__
     57 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     58 
     59 .. container::
     60 
     61   Based on :ref:`mozilla_projects_nss_ssl_functions_ssltyp` in the SSL Reference.
     62 
     63 .. _nss_initialization_and_shutdown:
     64 
     65 `NSS initialization and shutdown <#nss_initialization_and_shutdown>`__
     66 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     67 
     68 .. container::
     69 
     70   -  NSS_Init
     71   -  NSS_InitReadWrite
     72   -  NSS_NoDB_Init
     73   -  :ref:`mozilla_projects_nss_reference_nss_initialize`
     74   -  NSS_Shutdown
     75 
     76 .. _utility_functions:
     77 
     78 `Utility functions <#utility_functions>`__
     79 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     80 
     81 .. container::
     82 
     83   Based on :ref:`mozilla_projects_nss_reference_nss_functions#utility_functions` in NSS Public
     84   Functions.
     85 
     86 .. _certificate_functions:
     87 
     88 `Certificate functions <#certificate_functions>`__
     89 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     90 
     91 .. container::
     92 
     93   Based on :ref:`mozilla_projects_nss_ssl_functions_sslcrt` in the SSL Reference and
     94   :ref:`mozilla_projects_nss_reference_nss_functions#certificate_functions` in NSS Public
     95   Functions.
     96 
     97   -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#validating_certificates`
     98 
     99      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_verifycertnow`
    100      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_verifycert`
    101      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_verifycertname`
    102      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_checkcertvalidtimes`
    103      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#nss_cmpcertchainwcanames`
    104 
    105   -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#manipulating_certificates`
    106 
    107      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_dupcertificate`
    108      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_destroycertificate`
    109      -  SEC_DeletePermCertificate
    110      -  \__CERT_ClosePermCertDB
    111 
    112   -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#getting_certificate_information`
    113 
    114      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_findcertbyname`
    115      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_getcertnicknames`
    116      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_freenicknames`
    117      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_getdefaultcertdb`
    118      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#nss_findcertkeatype`
    119 
    120   -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#comparing_secitem_objects`
    121 
    122      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#secitem_compareitem`
    123 
    124 .. _key_functions:
    125 
    126 `Key functions <#key_functions>`__
    127 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    128 
    129 .. container::
    130 
    131   :ref:`mozilla_projects_nss_reference_nss_key_functions`
    132 
    133   -  :ref:`mozilla_projects_nss_ssl_functions_sslkey#seckey_getdefaultkeydb`
    134   -  :ref:`mozilla_projects_nss_ssl_functions_sslkey#seckey_destroyprivatekey`
    135 
    136 .. _digital_signatures:
    137 
    138 `Digital signatures <#digital_signatures>`__
    139 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    140 
    141 .. container::
    142 
    143   This API consists of the routines used to perform signature generation and the routines used to
    144   perform signature verification.
    145 
    146 .. _encryption.2fdecryption:
    147 
    148 `Encryption/decryption <#encryption.2fdecryption>`__
    149 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    150 
    151 .. container::
    152 
    153 `Hashing <#hashing>`__
    154 ~~~~~~~~~~~~~~~~~~~~~~
    155 
    156 .. container::
    157 
    158 .. _key_generation:
    159 
    160 `Key generation <#key_generation>`__
    161 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    162 
    163 .. container::
    164 
    165   Generate keys, key pairs, and domain parameters.
    166 
    167 .. _random_number_generation:
    168 
    169 `Random number generation <#random_number_generation>`__
    170 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    171 
    172 .. container::
    173 
    174   This API consists of the two routines used for pseudorandom number generation --
    175   PK11_GenerateRandomOnSlot and PK11_GenerateRandom -- and the two routines used for seeding
    176   pseudorandom number generation -- PK11_SeedRandom and PK11_RandomUpdate.
    177 
    178 .. _pkcs_.2311_functions:
    179 
    180 `PKCS #11 functions <#pkcs_.2311_functions>`__
    181 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    182 
    183 .. container::
    184 
    185   Based on :ref:`mozilla_projects_nss_ssl_functions_pkfnc` in the SSL Reference and
    186   :ref:`mozilla_projects_nss_reference_nss_functions#cryptography_functions` in NSS Public
    187   Functions.
    188 
    189   -  :ref:`mozilla_projects_nss_pkcs11_functions#secmod_loadusermodule`
    190   -  :ref:`mozilla_projects_nss_pkcs11_functions#secmod_unloadusermodule`
    191   -  :ref:`mozilla_projects_nss_pkcs11_functions#secmod_closeuserdb`
    192   -  :ref:`mozilla_projects_nss_pkcs11_functions#secmod_openuserdb`
    193   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_findcertfromnickname`
    194   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_findkeybyanycert`
    195   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_getslotname`
    196   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_gettokenname`
    197   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_ishw`
    198   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_ispresent`
    199   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_isreadonly`
    200   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_setpasswordfunc`
    201 
    202 .. _ssl_functions:
    203 
    204 `SSL Functions <#ssl_functions>`__
    205 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    206 
    207 .. container::
    208 
    209   Based on :ref:`mozilla_projects_nss_ssl_functions_sslfnc` in the SSL Reference and
    210   :ref:`mozilla_projects_nss_reference_nss_functions#ssl_functions` and
    211   :ref:`mozilla_projects_nss_reference_nss_functions#deprecated_ssl_functions` in NSS Public
    212   Functions.
    213 
    214   -  SSL_ConfigServerSessionIDCache
    215   -  SSL_ClearSessionCache
    216 
    217 .. _s.2fmime:
    218 
    219 `S/MIME <#s.2fmime>`__
    220 ~~~~~~~~~~~~~~~~~~~~~~
    221 
    222 .. container::
    223 
    224   Based on the `S/MIME
    225   Reference <https://www-archive.mozilla.org/projects/security/pki/nss/ref/smime/>`__ (which only
    226   has one written chapter) and
    227   :ref:`mozilla_projects_nss_reference_nss_functions#s_2fmime_functions` in NSS Public Functions.
    228 
    229 .. _pkcs_.237_functions:
    230 
    231 `PKCS #7 functions <#pkcs_.237_functions>`__
    232 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    233 
    234 .. container::
    235 
    236   Based on `"Archived PKCS #7 Functions
    237   documentation." <https://www-archive.mozilla.org/projects/security/pki/nss/ref/nssfunctions.html#pkcs7>`__
    238 
    239 .. _pkcs_.235_functions:
    240 
    241 `PKCS #5 functions <#pkcs_.235_functions>`__
    242 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    243 
    244 .. container::
    245 
    246   Password-based encryption
    247 
    248   -  SEC_PKCS5GetIV
    249   -  SEC_PKCS5CreateAlgorithmID
    250   -  SEC_PKCS5GetCryptoAlgorithm
    251   -  SEC_PKCS5GetKeyLength
    252   -  SEC_PKCS5GetPBEAlgorithm
    253   -  SEC_PKCS5IsAlgorithmPBEAlg
    254 
    255 .. _pkcs_.2312_functions:
    256 
    257 `PKCS #12 functions <#pkcs_.2312_functions>`__
    258 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    259 
    260 .. container::
    261 
    262   Based on `"Archived PKCS #12 Functions
    263   documentation." <https://www-archive.mozilla.org/projects/security/pki/nss/ref/nssfunctions.html#pkcs12>`__
    264   Used to exchange data such as private keys and certificates between two parties.
    265 
    266   -  SEC_PKCS12CreateExportContext
    267   -  SEC_PKCS12CreatePasswordPrivSafe
    268   -  SEC_PKCS12CreateUnencryptedSafe
    269   -  SEC_PKCS12AddCertAndKey
    270   -  SEC_PKCS12AddPasswordIntegrity
    271   -  SEC_PKCS12EnableCipher
    272   -  SEC_PKCS12Encode
    273   -  SEC_PKCS12DestroyExportContext
    274   -  SEC_PKCS12DecoderStart
    275   -  SEC_PKCS12DecoderImportBags
    276   -  SEC_PKCS12DecoderUpdate
    277   -  SEC_PKCS12DecoderFinish
    278   -  SEC_PKCS12DecoderValidateBags
    279   -  SEC_PKCS12DecoderVerify
    280   -  SEC_PKCS12DecoderGetCerts
    281   -  SEC_PKCS12DecoderSetTargetTokenCAs
    282   -  SEC_PKCS12DecoderIterateInit
    283   -  SEC_PKCS12DecoderIterateNext
    284   -  SEC_PKCS12IsEncryptionAllowed
    285   -  SEC_PKCS12SetPreferredCipher
    286 
    287 .. _nspr_functions:
    288 
    289 `NSPR functions <#nspr_functions>`__
    290 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    291 
    292 .. container::
    293 
    294   A small number of :ref:`mozilla_projects_nss_reference_nspr_functions` are required for using the
    295   certificate verification and SSL functions in NSS.  These functions are listed in this section.
    296 
    297 .. _error_codes:
    298 
    299 `Error codes <#error_codes>`__
    300 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    301 
    302 .. container::
    303 
    304   Based on :ref:`mozilla_projects_nss_ssl_functions_sslerr` in the SSL Reference.
    305 
    306 .. _nss_environment_variables:
    307 
    308 `NSS Environment variables <#nss_environment_variables>`__
    309 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    310 
    311 .. container::
    312 
    313   :ref:`mozilla_projects_nss_reference_nss_environment_variables`
    314 
    315 .. _nss_cryptographic_module:
    316 
    317 `NSS cryptographic module <#nss_cryptographic_module>`__
    318 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    319 
    320 .. container::
    321 
    322   :ref:`mozilla_projects_nss_reference_nss_cryptographic_module`
    323 
    324 .. _nss_tech_notes:
    325 
    326 `NSS Tech Notes <#nss_tech_notes>`__
    327 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    328 
    329 .. container::
    330 
    331   :ref:`mozilla_projects_nss_nss_tech_notes` :ref:`mozilla_projects_nss_memory_allocation`
    332 
    333 `Tools <#tools>`__
    334 ~~~~~~~~~~~~~~~~~~
    335 
    336 .. container::
    337 
    338   Based on :ref:`mozilla_projects_nss_tools` documentation.
    339 
    340   Based on :ref:`mozilla_projects_nss_tools`