aboutsummaryrefslogtreecommitdiff
path: root/files/ru/mozilla/projects/nss
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
commit074785cea106179cb3305637055ab0a009ca74f2 (patch)
treee6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/ru/mozilla/projects/nss
parentda78a9e329e272dedb2400b79a3bdeebff387d47 (diff)
downloadtranslated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz
translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2
translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip
initial commit
Diffstat (limited to 'files/ru/mozilla/projects/nss')
-rw-r--r--files/ru/mozilla/projects/nss/nss_sample_code/index.html33
-rw-r--r--files/ru/mozilla/projects/nss/nss_sample_code/nss_sample_code_sample_2_initialization_of_nss/index.html255
-rw-r--r--files/ru/mozilla/projects/nss/reference/fc_login/index.html53
-rw-r--r--files/ru/mozilla/projects/nss/reference/index.html161
4 files changed, 502 insertions, 0 deletions
diff --git a/files/ru/mozilla/projects/nss/nss_sample_code/index.html b/files/ru/mozilla/projects/nss/nss_sample_code/index.html
new file mode 100644
index 0000000000..2bc6d0e4fc
--- /dev/null
+++ b/files/ru/mozilla/projects/nss/nss_sample_code/index.html
@@ -0,0 +1,33 @@
+---
+title: NSS Sample Code
+slug: Mozilla/Projects/NSS/NSS_Sample_Code
+tags:
+ - Example
+ - NeedsTranslation
+ - TopicStub
+translation_of: Mozilla/Projects/NSS/NSS_Sample_Code
+---
+<h2 id="NSS_Sample_Code">NSS Sample Code</h2>
+
+<p>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.</p>
+
+<p>Old samples in the process of being replaced.</p>
+
+<ol>
+ <li><a href="nss_sample_code/NSS_Sample_Code_Sample1">Sample Code 1: Key Generation and Transport Between Servers</a></li>
+ <li><a href="nss_sample_code/NSS_Sample_Code_sample2">Sample Code 2: Symmetric Encryption</a></li>
+ <li><a href="nss_sample_code/NSS_Sample_Code_sample3">Sample Code 3: Hashing, MAC</a></li>
+ <li><a href="nss_sample_code/NSS_Sample_Code_sample4">Sample Code 4: PKI Encryption</a></li>
+ <li><a href="nss_sample_code/NSS_Sample_Code_sample5">Sample Code 5: PKI Encryption with a raw public &amp; private key in DER format</a></li>
+ <li><a href="nss_sample_code/NSS_Sample_Code_sample6">Sample Code 6: Persistent Symmetric Keys in NSS database</a></li>
+</ol>
+
+<p><br>
+ These are very old examples in need of replacement. See <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=490238">https://bugzilla.mozilla.org/show_bug.cgi?id=490238</a></p>
+
+<p>You are welcome to download the new samples via:</p>
+
+<pre class="bz_comment_text" id="comment_text_42">hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update SAMPLES_BRANCH
+</pre>
+
+<p>The new samples: <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/New_NSS_Samples">https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/New_NSS_Samples</a></p>
diff --git a/files/ru/mozilla/projects/nss/nss_sample_code/nss_sample_code_sample_2_initialization_of_nss/index.html b/files/ru/mozilla/projects/nss/nss_sample_code/nss_sample_code_sample_2_initialization_of_nss/index.html
new file mode 100644
index 0000000000..d3a5983c84
--- /dev/null
+++ b/files/ru/mozilla/projects/nss/nss_sample_code/nss_sample_code_sample_2_initialization_of_nss/index.html
@@ -0,0 +1,255 @@
+---
+title: NSS Sample Code Sample_2_Initialization of NSS
+slug: >-
+ Mozilla/Projects/NSS/NSS_Sample_Code/NSS_Sample_Code_Sample_2_Initialization_of_NSS
+tags:
+ - Example
+ - Mozilla firefox nss init
+ - NSS
+ - Security
+ - Инициализация NSS
+ - Пример
+translation_of: >-
+ Mozilla/Projects/NSS/NSS_Sample_Code/NSS_Sample_Code_Sample_2_Initialization_of_NSS
+---
+<h2 id="NSS_Sample_Code_2_Initializing_NSS">NSS Sample Code 2: Initializing NSS</h2>
+
+<p>Эта программа демонстрирует как инициализировать NSS Database. Так же эта программа иллюстрирует обработку пароля.</p>
+
+<h3 id="Пример_NSS_инициализации_и_обработки_пароля">Пример NSS инициализации и обработки пароля</h3>
+
+<pre>/* NSPR Заголовки*/
+#include &lt;prthread.h&gt;
+#include &lt;plgetopt.h&gt;
+#include &lt;prprf.h&gt;
+
+/* NSS Заголовки */
+#include &lt;nss.h&gt;
+#include &lt;pk11func.h&gt;
+
+#include "util.h"
+
+// для того, чтобы русские буквы отображались корректно используйте setlocale(LC_ALL,"RUS") в main() :)
+
+/* Вывести сообщение о том, какая база данных используется и выйти */
+static void Usage(const char *progName)
+{
+ fprintf(stderr, "\nИспользуется: %s -d &lt;dbdirpath&gt; [-p &lt;plainpasswc&gt;]"
+ " [-f &lt;passwdffile&gt;]\n\n",
+ progName);
+ fprintf(stderr, "%-15s Укажите путь к каталогу базы данных\n\n",
+ "-d &lt;dbdirpath&gt;");
+ fprintf(stderr, "%-15s Укажите незашифрованный пароль\n\n",
+ "-p &lt;plainpasswc&gt;");
+ fprintf(stderr, "%-15s Укажите файл с паролями\n\n",
+ "-f &lt;plainpasswc&gt;");
+ exit(-1);
+}
+
+/* Инициализация пароля слота*/
+char *InitSlotPassword(PK11SlotInfo *slot, PRBool retry, void *arg)
+{
+ FILE *input;
+ FILE *output;
+ char *p0 = NULL;
+ char *p1 = NULL;
+ secuPWData *pwdata = (secuPWData *) arg;
+
+ if (pwdata-&gt;source == PW_FROMFILE) {
+ return FilePasswd(slot, retry, pwdata-&gt;data);
+ }
+ if (pwdata-&gt;source == PW_PLAINTEXT) {
+ return PL_strdup(pwdata-&gt;data);
+ }
+
+ /* Открыть терминал (linux)*/
+ input = fopen("/dev/tty", "r");
+ if (input == NULL) {
+ PR_fprintf(PR_STDERR, "Ошибка открытия терминала для чтения\n");
+ return NULL;
+ }
+
+ /* У нас нет паролей, давайте инициализируем базу данных*/
+ PR_fprintf(PR_STDERR,
+ "Введите пароль который будет закодирован вашим ключом.\n"
+ "Пароль должен быть длиннее восьми символов ,\n"
+ "И содержать хотя бы одну букву из алфавита.\n\n");
+
+ output = fopen("/dev/tty", "w");
+ if (output == NULL) {
+ PR_fprintf(PR_STDERR, "Ошибка открытия консоли для записи\n");
+ return NULL;
+ }
+
+ for (;;) {
+ if (p0)
+ PORT_Free(p0);
+ p0 = GetPassword(input, output, "Введите новый пароль: ",
+ CheckPassword);
+ if (p1)
+ PORT_Free(p1);
+ p1 = GetPassword(input, output, "Введите пароль повторно: ",
+ CheckPassword);
+ if (p0 &amp;&amp; p1 &amp;&amp; !PORT_Strcmp(p0, p1)) {
+ break;
+ }
+ PR_fprintf(PR_STDERR, "Пароли не совпадают. Попробуйте ещё раз.\n");
+ }
+
+ /* Убрать дубликат пароля из строки*/
+ if (p1) {
+ PORT_Memset(p1, 0, PORT_Strlen(p1));
+ PORT_Free(p1);
+ }
+ fclose(input);
+ fclose(output);
+
+ return p0;
+}
+
+/* Смена пароля */
+SECStatus ChangePW(PK11SlotInfo *slot, char *oldPass, char *newPass,
+ char *oldPwFile, char *newPwFile)
+{
+ SECStatus rv;
+ secuPWData pwdata;
+ secuPWData newpwdata;
+ char *oldpw = NULL;
+ char *newpw = NULL;
+
+ if (oldPass) {
+ pwdata.source = PW_PLAINTEXT;
+ pwdata.data = oldPass;
+ } else if (oldPwFile) {
+ pwdata.source = PW_FROMFILE;
+ pwdata.data = oldPwFile;
+ } else {
+ pwdata.source = PW_NONE;
+ pwdata.data = NULL;
+ }
+
+ if (newPass) {
+ newpwdata.source = PW_PLAINTEXT;
+ newpwdata.data = newPass;
+ } else if (newPwFile) {
+ newpwdata.source = PW_FROMFILE;
+ newpwdata.data = NULL;
+ } else {
+ newpwdata.source = PW_NONE;
+ newpwdata.data = NULL;
+ }
+
+ if (PK11_NeedUserInit(slot)) {
+ newpw = InitSlotPassword(slot, PR_FALSE, &amp;pwdata);
+ rv = PK11_InitPin(slot, (char*)NULL, newpw);
+ }
+ else {
+ for (;;) {
+ oldpw = GetModulePassword(slot, PR_FALSE, &amp;pwdata);
+
+ if (PK11_CheckUserPassword(slot, oldpw) != SECSuccess) {
+ if (pwdata.source == PW_NONE) {
+ PR_fprintf(PR_STDERR, "Invalid password. Try again.\n");
+ } else {
+ PR_fprintf(PR_STDERR, "Invalid password.\n");
+ PORT_Memset(oldpw, 0, PL_strlen(oldpw));
+ PORT_Free(oldpw);
+ return SECFailure;
+ }
+ } else {
+ break;
+ }
+ PORT_Free(oldpw);
+ }
+ newpw = InitSlotPassword(slot, PR_FALSE, &amp;newpwdata);
+
+ if (PK11_ChangePW(slot, oldpw, newpw) != SECSuccess) {
+ PR_fprintf(PR_STDERR, "Не получилось изменить пароль.\n");
+ return SECFailure;
+ }
+ PORT_Memset(oldpw, 0, PL_strlen(oldpw));
+ PORT_Free(oldpw);
+ PR_fprintf(PR_STDOUT, "Пароль изменён успешно!.\n");
+ }
+ PORT_Memset(newpw, 0, PL_strlen(newpw));
+ PORT_Free(newpw);
+ return SECSuccess;
+}
+
+/*
+ * Этот пример показывает как инициализировать nss базу данных.
+ * Он создаёт новую nss конфигурационную директорию с пустой базой данных
+ * и инициализирует базы данных. Так же он показывает методы
+ * для обработки пароля.
+ */
+int main(int argc, char **argv)
+{
+ PLOptState *optstate;
+ PLOptStatus status;
+ SECStatus rv;
+ SECStatus rvShutdown;
+ char *slotname = "internal";
+ PK11SlotInfo *slot = NULL;
+ char *dbdir = NULL;
+ char *plainPass = NULL;
+ char *pwFile = NULL;
+
+ char * progName = strrchr(argv[0], '/');
+ progName = progName ? progName + 1 : argv[0];
+
+ /* Копирование аргументов командной строки */
+ optstate = PL_CreateOptState(argc, argv, "d:p:q:f:g:");
+ while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) {
+ switch (optstate-&gt;option) {
+ case 'd':
+ dbdir = strdup(optstate-&gt;value);
+ break;
+ case 'p':
+ plainPass = strdup(optstate-&gt;value);
+ break;
+ case 'f':
+ pwFile = strdup(optstate-&gt;value);
+ break;
+ default:
+ Usage(progName);
+ break;
+ }
+ }
+ PL_DestroyOptState(optstate);
+
+ if (!dbdir)
+ Usage(progName);
+
+ PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
+
+ /* Создать базу данных */
+ rv = NSS_InitReadWrite(dbdir);
+ if (rv != SECSuccess) {
+ PR_fprintf(PR_STDERR, "NSS_Initialize Failed ( не получилось инициализировать nss )");
+ PR_Cleanup();
+ exit(rv);
+ }
+
+ if (PL_strcmp(slotname, "internal") == 0)
+ slot = PK11_GetInternalKeySlot();
+
+ /* Если создаётся новая база данных, инициализируем пароль.*/
+ rv = ChangePW(slot, plainPass, 0, pwFile, 0);
+ if (rv != SECSuccess) {
+ PR_fprintf(PR_STDERR, "Не получилось сменить пароль\n");
+ }
+
+ if (slot) {
+ PK11_FreeSlot(slot);
+ }
+ rvShutdown = NSS_Shutdown();
+ if (rvShutdown != SECSuccess) {
+ PR_fprintf(PR_STDERR, "Failed : NSS_Shutdown() ( ошибка : выключение nss )\n");
+ rv = SECFailure;
+ }
+
+ PR_Cleanup();
+
+ return rv;
+}
+&lt;/plainpasswc&gt;&lt;/plainpasswc&gt;&lt;/dbdirpath&gt;&lt;/passwdffile&gt;&lt;/plainpasswc&gt;&lt;/dbdirpath&gt;&lt;/pk11func.h&gt;&lt;/nss.h&gt;&lt;/prprf.h&gt;&lt;/plgetopt.h&gt;&lt;/prthread.h&gt;</pre>
diff --git a/files/ru/mozilla/projects/nss/reference/fc_login/index.html b/files/ru/mozilla/projects/nss/reference/fc_login/index.html
new file mode 100644
index 0000000000..5842a77b23
--- /dev/null
+++ b/files/ru/mozilla/projects/nss/reference/fc_login/index.html
@@ -0,0 +1,53 @@
+---
+title: FC_Login
+slug: Mozilla/Projects/NSS/Reference/FC_Login
+translation_of: Mozilla/Projects/NSS/Reference/FC_Login
+---
+<p>
+</p>
+<h3 id="Name" name="Name"> Name </h3>
+<p><code>FC_Login()</code> - log a user into a token.
+</p>
+<h3 id="Syntax" name="Syntax"> Syntax </h3>
+<pre class="eval"><a href="en/CK_RV">CK_RV</a> FC_Login(
+ <a href="en/CK_SESSION_HANDLE">CK_SESSION_HANDLE</a> hSession,
+ <a href="en/CK_USER_TYPE">CK_USER_TYPE</a> userType,
+ <a href="en/CK_CHAR">CK_CHAR_PTR</a> pPin,
+ <a href="en/CK_ULONG">CK_ULONG</a> ulPinLen
+);
+</pre>
+<h3 id="Parameters" name="Parameters"> Parameters </h3>
+<p><code>FC_Login()</code> takes four parameters:
+</p>
+<dl><dt><code>hSession</code>
+</dt><dd>{{ mediawiki.external('in') }} a session handle
+</dd><dt><code>userType</code>
+</dt><dd>{{ mediawiki.external('in') }} the user type (<code>CKU_SO</code> or <code>CKU_USER</code>)
+</dd><dt><code>pPin</code>
+</dt><dd>{{ mediawiki.external('in') }} a pointer that points to the user's PIN
+</dd><dt><code>ulPinLen</code>
+</dt><dd>{{ mediawiki.external('in') }} the length of the PIN
+</dd></dl>
+<h3 id="Description" name="Description"> Description </h3>
+<p><code>FC_Login()</code> logs a user into a token.
+</p><p>The Security Officer (<code>CKU_SO</code>) only logs in to initialize the normal user's PIN. The SO PIN is the empty string. The NSS cryptographic module doesn't allow the SO to log in if the normal user's PIN is already initialized.
+</p>
+<h3 id="Return_value" name="Return_value"> Return value </h3>
+<p><code>FC_Login()</code> returns the following return codes.
+</p>
+<ul><li> <code>CKR_OK</code>: the user logged in successfully.
+</li><li> <code>CKR_DEVICE_ERROR</code>: the token is in the Error state.
+</li><li> <code>CKR_HOST_MEMORY</code>: memory allocation failed.
+</li><li> <code>CKR_PIN_INCORRECT</code>: the PIN is incorrect.
+</li><li> <code>CKR_PIN_LEN_RANGE</code>: the PIN is too long (<code>ulPinLen</code> is greater than 255).<div class="note">The function should return <code>CKR_PIN_INCORRECT</code> in this case.</div>
+</li><li> <code>CKR_SESSION_HANDLE_INVALID</code>: the session handle is invalid.
+</li><li> <code>CKR_USER_ALREADY_LOGGED_IN</code>: the user is already logged in.
+</li><li> <code>CKR_USER_TYPE_INVALID</code>
+<ul><li> The token can't authenticate the user because there is no key database or the user's password isn't initialized.
+</li><li> <code>userType</code> is <code>CKU_SO</code> and the normal user's PIN is already initialized.
+</li></ul>
+</li></ul>
+<h3 id="See_also" name="See_also"> See also </h3>
+<ul><li> <a href="en/NSC_Login">NSC_Login</a>
+</li></ul>
+{{ languages( { "ja": "ja/FC_Login" } ) }}
diff --git a/files/ru/mozilla/projects/nss/reference/index.html b/files/ru/mozilla/projects/nss/reference/index.html
new file mode 100644
index 0000000000..fefd88af2a
--- /dev/null
+++ b/files/ru/mozilla/projects/nss/reference/index.html
@@ -0,0 +1,161 @@
+---
+title: NSS reference
+slug: Mozilla/Projects/NSS/Reference
+tags:
+ - NSS
+ - NeedsTranslation
+ - TopicStub
+translation_of: Mozilla/Projects/NSS/Reference
+---
+<p>  </p>
+<h3 id="Initial_Notes" name="Initial_Notes">Initial Notes</h3>
+<div class="note">
+ <ul>
+ <li>We are migrating the <a class="external" href="https://developer.mozilla.org/NSS/SSL_functions/OLD_SSL_Reference">SSL Reference</a> into the format described in the <a href="https://developer.mozilla.org/en-US/docs/Project:MDC_style_guide">MDN Style Guide</a>. If you are inclined to help with this migration, your help would be very much appreciated.</li>
+ </ul>
+ <ul>
+ <li>The proposed chapters below are based on the chapters of the <a class="external" href="https://developer.mozilla.org/NSS/SSL_functions/OLD_SSL_Reference">SSL Reference</a> and the categories of functions in <a class="external" href="/en/docs/NSS_functions" title="en/docs/NSS_functions">NSS Public Functions</a>.</li>
+ </ul>
+ <ul>
+ <li>Should a particular page require the use of an underscore, please see the documentation for the <a href="/Project:En/MDC_style_guide#Title_Override_Extension" title="Project:En/MDC_style_guide#Title_Override_Extension">Title Override Extension</a>.</li>
+ </ul>
+</div>
+<p>  </p>
+<h3 id="Building_and_installing_NSS" name="Building_and_installing_NSS"><a href="/en/NSS_reference/Building_and_installing_NSS" title="en/NSS_reference/Building_and_installing_NSS">Building and installing NSS</a></h3>
+<h3 id="Overview_of_an_NSS_application" name="Overview_of_an_NSS_application">Overview of an NSS application</h3>
+<p>Based on <a class="external" href="https://developer.mozilla.org/en-US/docs/NSS/SSL_functions/sslintro.html">"Overview of an SSL Application"</a> in the SSL Reference.</p>
+<h3 id="Getting_started_with_NSS" name="Getting_started_with_NSS">Getting started with NSS</h3>
+<p>Based on <a class="external" href="https://developer.mozilla.org/en-US/docs/NSS/SSL_functions/gtstd.html">"Getting Started With SSL"</a> in the SSL Reference.</p>
+<h3 id="Data_types" name="Data_types">Data types</h3>
+<p>Based on <a class="external" href="https://developer.mozilla.org/en-US/docs/NSS/SSL_functions/ssltyp.html">"Selected SSL Types and Structures"</a> in the SSL Reference.</p>
+<h3 id="NSS_initialization_and_shutdown">NSS initialization and shutdown</h3>
+<ul>
+ <li>NSS_Init</li>
+ <li>NSS_InitReadWrite</li>
+ <li>NSS_NoDB_Init</li>
+ <li><a href="/en/NSS_Initialize" title="en/NSS Initialize">NSS_Initialize</a></li>
+ <li>NSS_Shutdown</li>
+</ul>
+<h3 id="Utility_functions" name="Utility_functions">Utility functions</h3>
+<p>Based on <a class="external" href="https://developer.mozilla.org/en-US/docs/NSS_functions#Utility_functions">"Utility Functions"</a> in NSS Public Functions.</p>
+<h3 id="Certificate_functions" name="Certificate_functions">Certificate functions</h3>
+<p>Based on <a href="https://developer.mozilla.org/en-US/docs/NSS/SSL_functions/sslcrt.html">Certificate Functions</a> in the SSL Reference and <a class="external" href="https://developer.mozilla.org/en-US/docs/NSS_functions#Certificate_functions">"Certificate Functions"</a> in NSS Public Functions.</p>
+<ul>
+ <li><a href="/en/NSS_Certificate_Functions#Validating_Certificates" title="en/NSS_Certificate_Functions#Validating_Certificates">Validating Certificates</a>
+ <ul>
+ <li><a href="/en/NSS_Certificate_Functions#CERT_VerifyCertNow" title="en/NSS_Certificate_Functions#CERT_VerifyCertNow">CERT_VerifyCertNow</a></li>
+ <li><a href="/en/NSS_Certificate_Functions#CERT_VerifyCert" title="en/NSS_Certificate_Functions#CERT_VerifyCert">CERT_VerifyCert</a></li>
+ <li><a href="/en/NSS_Certificate_Functions#CERT_VerifyCertName" title="en/NSS_Certificate_Functions#CERT_VerifyCertName">CERT_VerifyCertName</a></li>
+ <li><a href="/en/NSS_Certificate_Functions#CERT_CheckCertValidTimes" title="en/NSS_Certificate_Functions#CERT_CheckCertValidTimes">CERT_CheckCertValidTimes</a></li>
+ <li><a href="/en/NSS_Certificate_Functions#NSS_CmpCertChainWCANames" title="en/NSS_Certificate_Functions#NSS_CmpCertChainWCANames">NSS_CmpCertChainWCANames</a></li>
+ </ul>
+ </li>
+ <li><a href="/en/NSS_Certificate_Functions#Manipulating_Certificates" title="en/NSS_Certificate_Functions#Manipulating_Certificates">Manipulating Certificates</a>
+ <ul>
+ <li><a href="/en/NSS_Certificate_Functions#CERT_DupCertificate" title="en/NSS_Certificate_Functions#CERT_DupCertificate">CERT_DupCertificate</a></li>
+ <li><a href="/en/NSS_Certificate_Functions#CERT_DestroyCertificate" title="en/NSS_Certificate_Functions#CERT_DestroyCertificate">CERT_DestroyCertificate</a></li>
+ <li>SEC_DeletePermCertificate</li>
+ <li>__CERT_ClosePermCertDB</li>
+ </ul>
+ </li>
+ <li><a href="/en/NSS_Certificate_Functions#Getting_Certificate_Information" title="en/NSS_Certificate_Functions#Getting_Certificate_Information">Getting Certificate Information</a>
+ <ul>
+ <li><a href="/en/NSS_Certificate_Functions#CERT_FindCertByName" title="en/NSS_Certificate_Functions#CERT_FindCertByName">CERT_FindCertByName</a></li>
+ <li><a href="/en/NSS_Certificate_Functions#CERT_GetCertNicknames" title="en/NSS_Certificate_Functions#CERT_GetCertNicknames">CERT_GetCertNicknames</a></li>
+ <li><a href="/en/NSS_Certificate_Functions#CERT_FreeNicknames" title="en/NSS_Certificate_Functions#CERT_FreeNicknames">CERT_FreeNicknames</a></li>
+ <li><a href="/en/NSS_Certificate_Functions#CERT_GetDefaultCertDB" title="en/NSS_Certificate_Functions#CERT_GetDefaultCertDB">CERT_GetDefaultCertDB</a></li>
+ <li><a href="/en/NSS_Certificate_Functions#NSS_FindCertKEAType" title="en/NSS_Certificate_Functions#NSS_FindCertKEAType">NSS_FindCertKEAType</a></li>
+ </ul>
+ </li>
+ <li><a href="/en/NSS_Certificate_Functions#Comparing_SecItem_Objects" title="en/NSS_Certificate_Functions#Comparing_SecItem_Objects">Comparing SecItem Objects</a>
+ <ul>
+ <li><a href="/en/NSS_Certificate_Functions#SECITEM_CompareItem" title="en/NSS_Certificate_Functions#SECITEM_CompareItem">SECITEM_CompareItem</a></li>
+ </ul>
+ </li>
+</ul>
+<h3 id="Key_functions" name="Key_functions">Key functions</h3>
+<p><a href="/en/NSS_Key_Functions" title="en/NSS_Key_Functions">Key Functions</a></p>
+<ul>
+ <li><a href="/en/NSS_Key_Functions#SECKEY_GetDefaultKeyDB" title="en/NSS_Key_Functions#SECKEY_GetDefaultKeyDB">SECKEY_GetDefaultKeyDB</a></li>
+ <li><a href="/en/NSS_Key_Functions#SECKEY_DestroyPrivateKey" title="en/NSS_Key_Functions#SECKEY_DestroyPrivateKey">SECKEY_DestroyPrivateKey</a></li>
+</ul>
+<h3 id="Digital_signatures" name="Digital_signatures">Digital signatures</h3>
+<p>This API consists of the routines used to perform signature generation and the routines used to perform signature verification.</p>
+<h3 id="Encryption.2Fdecryption" name="Encryption.2Fdecryption">Encryption/decryption</h3>
+<h3 id="Hashing" name="Hashing">Hashing</h3>
+<h3 id="Key_generation" name="Key_generation">Key generation</h3>
+<p>Generate keys, key pairs, and domain parameters.</p>
+<h3 id="Random_number_generation" name="Random_number_generation">Random number generation</h3>
+<p>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.</p>
+<h3 id="PKCS_.2311_functions" name="PKCS_.2311_functions">PKCS #11 functions</h3>
+<p>Based on <a href="https://developer.mozilla.org/en-US/docs/NSS/SSL_functions/pkfnc.html">PKCS #11 Functions</a> in the SSL Reference and <a class="external" href="https://developer.mozilla.org/en-US/docs/NSS_functions#Cryptography_functions">"Crypto Functions"</a> in NSS Public Functions.</p>
+<ul>
+ <li><a href="/en/NSS_PKCS11_Functions#SECMOD_LoadUserModule" title="en/NSS_PKCS11_Functions#SECMOD_LoadUserModule">SECMOD_LoadUserModule</a></li>
+ <li><a href="/en/NSS_PKCS11_Functions#SECMOD_UnloadUserModule" title="en/NSS_PKCS11_Functions#SECMOD_UnloadUserModule">SECMOD_UnloadUserModule</a></li>
+ <li><a href="/en/NSS_PKCS11_Functions#SECMOD_CloseUserDB" title="en/NSS_PKCS11_Functions#SECMOD_CloseUserDB">SECMOD_CloseUserDB</a></li>
+ <li><a href="/en/NSS_PKCS11_Functions#SECMOD_OpenUserDB" title="en/NSS_PKCS11_Functions#SECMOD_OpenUserDB">SECMOD_OpenUserDB</a></li>
+ <li><a href="/en/NSS_PKCS11_Functions#PK11_FindCertFromNickname" title="en/NSS_PKCS11_Functions#PK11_FindCertFromNickname">PK11_FindCertFromNickname</a></li>
+ <li><a href="/en/NSS_PKCS11_Functions#PK11_FindKeyByAnyCert" title="en/NSS_PKCS11_Functions#PK11_FindKeyByAnyCert">PK11_FindKeyByAnyCert</a></li>
+ <li><a href="/en/NSS_PKCS11_Functions#PK11_GetSlotName" title="en/NSS_PKCS11_Functions#PK11_GetSlotName">PK11_GetSlotName</a></li>
+ <li><a href="/en/NSS_PKCS11_Functions#PK11_GetTokenName" title="en/NSS_PKCS11_Functions#PK11_GetTokenName">PK11_GetTokenName</a></li>
+ <li><a href="/en/NSS_PKCS11_Functions#PK11_IsHW" title="en/NSS_PKCS11_Functions#PK11_IsHW">PK11_IsHW</a></li>
+ <li><a href="/en/NSS_PKCS11_Functions#PK11_IsPresent" title="en/NSS_PKCS11_Functions#PK11_IsPresent">PK11_IsPresent</a></li>
+ <li><a href="/en/NSS_PKCS11_Functions#PK11_IsReadOnly" title="en/NSS_PKCS11_Functions#PK11_IsReadOnly">PK11_IsReadOnly</a></li>
+ <li><a href="/en/NSS_PKCS11_Functions#PK11_SetPasswordFunc" title="en/NSS_PKCS11_Functions#PK11_SetPasswordFunc">PK11_SetPasswordFunc</a></li>
+</ul>
+<h3 id="SSL_Functions" name="SSL_Functions">SSL Functions</h3>
+<p>Based on <a class="external" href="https://developer.mozilla.org/en-US/docs/NSS/SSL_functions/sslfnc.html">"SSL Functions"</a> in the SSL Reference and <a class="external" href="https://developer.mozilla.org/en-US/docs/NSS_functions#SSL_functions">"SSL Functions"</a> and <a class="external" href="https://developer.mozilla.org/en-US/docs/NSS_functions#Deprecated_SSL_functions">"Deprecated SSL Functions"</a> in NSS Public Functions.</p>
+<ul>
+ <li>SSL_ConfigServerSessionIDCache</li>
+ <li>SSL_ClearSessionCache</li>
+</ul>
+<h3 id="S.2FMIME" name="S.2FMIME">S/MIME</h3>
+<p>Based on the <a class="external" href="http://www-archive.mozilla.org/projects/security/pki/nss/ref/smime/">S/MIME Reference</a> (which only has one written chapter) and <a class="external" href="https://developer.mozilla.org/en-US/docs/NSS_functions#S.2FMIME_functions">"S/MIME Functions"</a> in NSS Public Functions.</p>
+<h3 id="PKCS_.237_functions" name="PKCS_.237_functions">PKCS #7 functions</h3>
+<p>Based on <a class="external" href="http://www-archive.mozilla.org/projects/security/pki/nss/ref/nssfunctions.html#pkcs7">"Archived PKCS #7 Functions documentation."</a></p>
+<h3 id="PKCS_.235_functions" name="PKCS_.235_functions">PKCS #5 functions</h3>
+<p>Password-based encryption</p>
+<ul>
+ <li>SEC_PKCS5GetIV</li>
+ <li>SEC_PKCS5CreateAlgorithmID</li>
+ <li>SEC_PKCS5GetCryptoAlgorithm</li>
+ <li>SEC_PKCS5GetKeyLength</li>
+ <li>SEC_PKCS5GetPBEAlgorithm</li>
+ <li>SEC_PKCS5IsAlgorithmPBEAlg</li>
+</ul>
+<h3 id="PKCS_.2312_functions" name="PKCS_.2312_functions">PKCS #12 functions</h3>
+<p>Based on <a class="external" href="http://www-archive.mozilla.org/projects/security/pki/nss/ref/nssfunctions.html#pkcs12">"Archived PKCS #12 Functions documentation."</a> Used to exchange data such as private keys and certificates between two parties.</p>
+<ul>
+ <li>SEC_PKCS12CreateExportContext</li>
+ <li>SEC_PKCS12CreatePasswordPrivSafe</li>
+ <li>SEC_PKCS12CreateUnencryptedSafe</li>
+ <li>SEC_PKCS12AddCertAndKey</li>
+ <li>SEC_PKCS12AddPasswordIntegrity</li>
+ <li>SEC_PKCS12EnableCipher</li>
+ <li>SEC_PKCS12Encode</li>
+ <li>SEC_PKCS12DestroyExportContext</li>
+ <li>SEC_PKCS12DecoderStart</li>
+ <li>SEC_PKCS12DecoderImportBags</li>
+ <li>SEC_PKCS12DecoderUpdate</li>
+ <li>SEC_PKCS12DecoderFinish</li>
+ <li>SEC_PKCS12DecoderValidateBags</li>
+ <li>SEC_PKCS12DecoderVerify</li>
+ <li>SEC_PKCS12DecoderGetCerts</li>
+ <li>SEC_PKCS12DecoderSetTargetTokenCAs</li>
+ <li>SEC_PKCS12DecoderIterateInit</li>
+ <li>SEC_PKCS12DecoderIterateNext</li>
+ <li>SEC_PKCS12IsEncryptionAllowed</li>
+ <li>SEC_PKCS12SetPreferredCipher</li>
+</ul>
+<h3 id="NSPR_functions" name="NSPR_functions"><a href="/En/NSS_reference/NSPR_functions" title="en/NSS_reference/NSPR_functions">NSPR functions</a></h3>
+<p>A small number of NSPR functions are required for using the certificate verification and SSL functions in NSS.  These functions are listed in this section.</p>
+<h3 id="Error_codes" name="Error_codes">Error codes</h3>
+<p>Based on <a class="external" href="https://developer.mozilla.org/en-US/docs/NSS/SSL_functions/sslerr.html">"NSS and SSL Error Codes"</a> in the SSL Reference.</p>
+<h3 id="NSS_Environment_variables" name="NSS_Environment_variables"><a href="/en/NSS_reference/NSS_environment_variables" title="en/NSS_reference/NSS_environment_variables">NSS Environment variables</a></h3>
+<h3 id="NSS_cryptographic_module" name="NSS_cryptographic_module"><a href="/en/NSS_reference/NSS_cryptographic_module" title="en/NSS_reference/NSS_cryptographic_module">NSS cryptographic module</a></h3>
+<h3 id="NSS_Tech_Notes" name="NSS_Tech_Notes">NSS Tech Notes</h3>
+<p><a class="external" href="https://developer.mozilla.org/en-US/docs/NSS/NSS_Tech_Notes">NSS Tech Notes</a> <a href="/en/NSS_Memory_allocation" title="en/NSS_Memory_allocation">NSS Memory allocation</a></p>
+<h3 id="Tools" name="Tools">Tools</h3>
+<p>Based on <a class="external" href="https://developer.mozilla.org/en-US/docs/NSS/Tools">NSS Tools</a> documentation.</p>
+<p>Based on <a class="extarnal" href="/en/NSS_reference/NSS_tools" title="en/NSS_reference/NSS_tools">NSS Tools Man Pages : work in progress</a></p>
+<p>{{ languages( { "ja": "ja/NSS_reference" } ) }}</p>