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