summaryrefslogtreecommitdiffstats
path: root/security/nss/doc/rst/legacy/reference/index.rst
blob: c872837e58db61d47b94c40926241f5fbfd480db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
.. _mozilla_projects_nss_reference:

NSS reference
=============

.. _initial_notes:

`Initial Notes <#initial_notes>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   .. container:: notecard note

      -  We are migrating the :ref:`mozilla_projects_nss_ssl_functions_old_ssl_reference` into the
         format described in the `MDN Style
         Guide <https://developer.mozilla.org/en-US/docs/MDN/Guidelines>`__. If you are inclined to
         help with this migration, your help would be very much appreciated.

      -  The proposed chapters below are based on the chapters of the
         :ref:`mozilla_projects_nss_ssl_functions_old_ssl_reference` and the categories of functions
         in :ref:`mozilla_projects_nss_reference_nss_functions`.

      -  Should a particular page require the use of an underscore, please see the documentation for
         the `Title Override Extension </Project:En/MDC_style_guide#Title_Override_Extension>`__.

.. _building_and_installing_nss:

`Building and installing NSS <#building_and_installing_nss>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   :ref:`mozilla_projects_nss_reference_building_and_installing_nss`

.. _overview_of_an_nss_application:

`Overview of an NSS application <#overview_of_an_nss_application>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   Based on :ref:`mozilla_projects_nss_ssl_functions_sslintro` in the SSL Reference.

.. _getting_started_with_nss:

`Getting started with NSS <#getting_started_with_nss>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   Based on :ref:`mozilla_projects_nss_ssl_functions_gtstd` in the SSL Reference.

.. _data_types:

`Data types <#data_types>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   Based on :ref:`mozilla_projects_nss_ssl_functions_ssltyp` in the SSL Reference.

.. _nss_initialization_and_shutdown:

`NSS initialization and shutdown <#nss_initialization_and_shutdown>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   -  NSS_Init
   -  NSS_InitReadWrite
   -  NSS_NoDB_Init
   -  :ref:`mozilla_projects_nss_reference_nss_initialize`
   -  NSS_Shutdown

.. _utility_functions:

`Utility functions <#utility_functions>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   Based on :ref:`mozilla_projects_nss_reference_nss_functions#utility_functions` in NSS Public
   Functions.

.. _certificate_functions:

`Certificate functions <#certificate_functions>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   Based on :ref:`mozilla_projects_nss_ssl_functions_sslcrt` in the SSL Reference and
   :ref:`mozilla_projects_nss_reference_nss_functions#certificate_functions` in NSS Public
   Functions.

   -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#validating_certificates`

      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_verifycertnow`
      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_verifycert`
      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_verifycertname`
      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_checkcertvalidtimes`
      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#nss_cmpcertchainwcanames`

   -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#manipulating_certificates`

      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_dupcertificate`
      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_destroycertificate`
      -  SEC_DeletePermCertificate
      -  \__CERT_ClosePermCertDB

   -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#getting_certificate_information`

      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_findcertbyname`
      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_getcertnicknames`
      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_freenicknames`
      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#cert_getdefaultcertdb`
      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#nss_findcertkeatype`

   -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#comparing_secitem_objects`

      -  :ref:`mozilla_projects_nss_reference_nss_certificate_functions#secitem_compareitem`

.. _key_functions:

`Key functions <#key_functions>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   :ref:`mozilla_projects_nss_reference_nss_key_functions`

   -  :ref:`mozilla_projects_nss_ssl_functions_sslkey#seckey_getdefaultkeydb`
   -  :ref:`mozilla_projects_nss_ssl_functions_sslkey#seckey_destroyprivatekey`

.. _digital_signatures:

`Digital signatures <#digital_signatures>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   This API consists of the routines used to perform signature generation and the routines used to
   perform signature verification.

.. _encryption.2fdecryption:

`Encryption/decryption <#encryption.2fdecryption>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

`Hashing <#hashing>`__
~~~~~~~~~~~~~~~~~~~~~~

.. container::

.. _key_generation:

`Key generation <#key_generation>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   Generate keys, key pairs, and domain parameters.

.. _random_number_generation:

`Random number generation <#random_number_generation>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   This API consists of the two routines used for pseudorandom number generation --
   PK11_GenerateRandomOnSlot and PK11_GenerateRandom -- and the two routines used for seeding
   pseudorandom number generation -- PK11_SeedRandom and PK11_RandomUpdate.

.. _pkcs_.2311_functions:

`PKCS #11 functions <#pkcs_.2311_functions>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   Based on :ref:`mozilla_projects_nss_ssl_functions_pkfnc` in the SSL Reference and
   :ref:`mozilla_projects_nss_reference_nss_functions#cryptography_functions` in NSS Public
   Functions.

   -  :ref:`mozilla_projects_nss_pkcs11_functions#secmod_loadusermodule`
   -  :ref:`mozilla_projects_nss_pkcs11_functions#secmod_unloadusermodule`
   -  :ref:`mozilla_projects_nss_pkcs11_functions#secmod_closeuserdb`
   -  :ref:`mozilla_projects_nss_pkcs11_functions#secmod_openuserdb`
   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_findcertfromnickname`
   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_findkeybyanycert`
   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_getslotname`
   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_gettokenname`
   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_ishw`
   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_ispresent`
   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_isreadonly`
   -  :ref:`mozilla_projects_nss_pkcs11_functions#pk11_setpasswordfunc`

.. _ssl_functions:

`SSL Functions <#ssl_functions>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   Based on :ref:`mozilla_projects_nss_ssl_functions_sslfnc` in the SSL Reference and
   :ref:`mozilla_projects_nss_reference_nss_functions#ssl_functions` and
   :ref:`mozilla_projects_nss_reference_nss_functions#deprecated_ssl_functions` in NSS Public
   Functions.

   -  SSL_ConfigServerSessionIDCache
   -  SSL_ClearSessionCache

.. _s.2fmime:

`S/MIME <#s.2fmime>`__
~~~~~~~~~~~~~~~~~~~~~~

.. container::

   Based on the `S/MIME
   Reference <https://www-archive.mozilla.org/projects/security/pki/nss/ref/smime/>`__ (which only
   has one written chapter) and
   :ref:`mozilla_projects_nss_reference_nss_functions#s_2fmime_functions` in NSS Public Functions.

.. _pkcs_.237_functions:

`PKCS #7 functions <#pkcs_.237_functions>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   Based on `"Archived PKCS #7 Functions
   documentation." <https://www-archive.mozilla.org/projects/security/pki/nss/ref/nssfunctions.html#pkcs7>`__

.. _pkcs_.235_functions:

`PKCS #5 functions <#pkcs_.235_functions>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   Password-based encryption

   -  SEC_PKCS5GetIV
   -  SEC_PKCS5CreateAlgorithmID
   -  SEC_PKCS5GetCryptoAlgorithm
   -  SEC_PKCS5GetKeyLength
   -  SEC_PKCS5GetPBEAlgorithm
   -  SEC_PKCS5IsAlgorithmPBEAlg

.. _pkcs_.2312_functions:

`PKCS #12 functions <#pkcs_.2312_functions>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   Based on `"Archived PKCS #12 Functions
   documentation." <https://www-archive.mozilla.org/projects/security/pki/nss/ref/nssfunctions.html#pkcs12>`__
   Used to exchange data such as private keys and certificates between two parties.

   -  SEC_PKCS12CreateExportContext
   -  SEC_PKCS12CreatePasswordPrivSafe
   -  SEC_PKCS12CreateUnencryptedSafe
   -  SEC_PKCS12AddCertAndKey
   -  SEC_PKCS12AddPasswordIntegrity
   -  SEC_PKCS12EnableCipher
   -  SEC_PKCS12Encode
   -  SEC_PKCS12DestroyExportContext
   -  SEC_PKCS12DecoderStart
   -  SEC_PKCS12DecoderImportBags
   -  SEC_PKCS12DecoderUpdate
   -  SEC_PKCS12DecoderFinish
   -  SEC_PKCS12DecoderValidateBags
   -  SEC_PKCS12DecoderVerify
   -  SEC_PKCS12DecoderGetCerts
   -  SEC_PKCS12DecoderSetTargetTokenCAs
   -  SEC_PKCS12DecoderIterateInit
   -  SEC_PKCS12DecoderIterateNext
   -  SEC_PKCS12IsEncryptionAllowed
   -  SEC_PKCS12SetPreferredCipher

.. _nspr_functions:

`NSPR functions <#nspr_functions>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   A small number of :ref:`mozilla_projects_nss_reference_nspr_functions` are required for using the
   certificate verification and SSL functions in NSS.  These functions are listed in this section.

.. _error_codes:

`Error codes <#error_codes>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   Based on :ref:`mozilla_projects_nss_ssl_functions_sslerr` in the SSL Reference.

.. _nss_environment_variables:

`NSS Environment variables <#nss_environment_variables>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   :ref:`mozilla_projects_nss_reference_nss_environment_variables`

.. _nss_cryptographic_module:

`NSS cryptographic module <#nss_cryptographic_module>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   :ref:`mozilla_projects_nss_reference_nss_cryptographic_module`

.. _nss_tech_notes:

`NSS Tech Notes <#nss_tech_notes>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. container::

   :ref:`mozilla_projects_nss_nss_tech_notes` :ref:`mozilla_projects_nss_memory_allocation`

`Tools <#tools>`__
~~~~~~~~~~~~~~~~~~

.. container::

   Based on :ref:`mozilla_projects_nss_tools` documentation.

   Based on :ref:`mozilla_projects_nss_tools`