security/nss/lib/ssl/sslerrstrs.c

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/ssl/sslerrstrs.c	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,34 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +#include "prerror.h"
     1.8 +#include "sslerr.h"
     1.9 +#include "prinit.h"
    1.10 +#include "nssutil.h"
    1.11 +#include "ssl.h"
    1.12 +
    1.13 +#define ER3(name, value, str) {#name, str},
    1.14 +
    1.15 +static const struct PRErrorMessage ssltext[] = {
    1.16 +#include "SSLerrs.h"
    1.17 +    {0,0}
    1.18 +};
    1.19 +
    1.20 +static const struct PRErrorTable ssl_et = {
    1.21 +    ssltext, "sslerr", SSL_ERROR_BASE,
    1.22 +        (sizeof ssltext)/(sizeof ssltext[0])
    1.23 +};
    1.24 +
    1.25 +static PRStatus
    1.26 +ssl_InitializePRErrorTableOnce(void) {
    1.27 +    return PR_ErrorInstallTable(&ssl_et);
    1.28 +}
    1.29 +
    1.30 +static PRCallOnceType once;
    1.31 +
    1.32 +SECStatus
    1.33 +ssl_InitializePRErrorTable(void)
    1.34 +{
    1.35 +    return (PR_SUCCESS == PR_CallOnce(&once, ssl_InitializePRErrorTableOnce))
    1.36 +		? SECSuccess : SECFailure;
    1.37 +}

mercurial