Blame nss/lib/ssl/sslerrstrs.c
|
Packit |
40b132 |
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
Packit |
40b132 |
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
Packit |
40b132 |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
Packit |
40b132 |
#include "prerror.h"
|
|
Packit |
40b132 |
#include "sslerr.h"
|
|
Packit |
40b132 |
#include "prinit.h"
|
|
Packit |
40b132 |
#include "nssutil.h"
|
|
Packit |
40b132 |
#include "ssl.h"
|
|
Packit |
40b132 |
|
|
Packit |
40b132 |
#define ER3(name, value, str) {#name, str},
|
|
Packit |
40b132 |
|
|
Packit |
40b132 |
static const struct PRErrorMessage ssltext[] = {
|
|
Packit |
40b132 |
#include "SSLerrs.h"
|
|
Packit |
40b132 |
{0,0}
|
|
Packit |
40b132 |
};
|
|
Packit |
40b132 |
|
|
Packit |
40b132 |
static const struct PRErrorTable ssl_et = {
|
|
Packit |
40b132 |
ssltext, "sslerr", SSL_ERROR_BASE,
|
|
Packit |
40b132 |
(sizeof ssltext)/(sizeof ssltext[0])
|
|
Packit |
40b132 |
};
|
|
Packit |
40b132 |
|
|
Packit |
40b132 |
static PRStatus
|
|
Packit |
40b132 |
ssl_InitializePRErrorTableOnce(void) {
|
|
Packit |
40b132 |
return PR_ErrorInstallTable(&ssl_et);
|
|
Packit |
40b132 |
}
|
|
Packit |
40b132 |
|
|
Packit |
40b132 |
static PRCallOnceType once;
|
|
Packit |
40b132 |
|
|
Packit |
40b132 |
SECStatus
|
|
Packit |
40b132 |
ssl_InitializePRErrorTable(void)
|
|
Packit |
40b132 |
{
|
|
Packit |
40b132 |
return (PR_SUCCESS == PR_CallOnce(&once, ssl_InitializePRErrorTableOnce))
|
|
Packit |
40b132 |
? SECSuccess : SECFailure;
|
|
Packit |
40b132 |
}
|