File: index.rst

package info (click to toggle)
thunderbird 1%3A143.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 4,703,968 kB
  • sloc: cpp: 7,770,492; javascript: 5,943,842; ansic: 3,918,754; python: 1,418,263; xml: 653,354; asm: 474,045; java: 183,079; sh: 111,238; makefile: 20,410; perl: 14,359; objc: 13,059; yacc: 4,583; pascal: 3,405; lex: 1,720; ruby: 999; exp: 762; sql: 715; awk: 580; php: 436; lisp: 430; sed: 69; csh: 10
file content (60 lines) | stat: -rw-r--r-- 2,249 bytes parent folder | download | duplicates (24)
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
.. _mozilla_projects_nss_reference_nss_key_functions:

NSS Key Functions
=================

.. container::

   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" <https://developer.mozilla.org/en-US/docs/NSS/SSL_functions/sslkey.html>`__.

   -  :ref:`mozilla_projects_nss_reference`
   -  `SECKEY_GetDefaultKeyDB <#seckey_getdefaultkeydb>`__
   -  `SECKEY_DestroyPrivateKey <#seckey_destroyprivatekey>`__

   .. rubric:: SECKEY_GetDefaultKeyDB
      :name: seckey_getdefaultkeydb

   Returns a handle to the default key database opened by NSS_Init.

   Syntax

   #. include <key.h>
   #. include <keyt.h>

   SECKEYKeyDBHandle \*SECKEY_GetDefaultKeyDB(void);

   Returns The function returns a handle of type SECKEYKeyDBHandle.

   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.

   .. rubric:: SECKEY_DestroyPrivateKey
      :name: seckey_destroyprivatekey

   Destroys a private key structure.

   Syntax

   #. include <key.h>
   #. include <keyt.h>

   void SECKEY_DestroyPrivateKey(SECKEYPrivateKey \*key);

   Parameter This function has the following parameter:

   key

   A pointer to the private key structure to destroy.

   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.

   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.