OLD | NEW |
1 /* | 1 /* |
2 * NSS utility functions | 2 * NSS utility functions |
3 * | 3 * |
4 * This Source Code Form is subject to the terms of the Mozilla Public | 4 * This Source Code Form is subject to the terms of the Mozilla Public |
5 * License, v. 2.0. If a copy of the MPL was not distributed with this | 5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
7 /* $Id: sslinit.c,v 1.3 2012/04/25 14:50:12 gerv%gerv.net Exp $ */ | 7 /* $Id$ */ |
8 | 8 |
9 #include "prtypes.h" | 9 #include "prtypes.h" |
10 #include "prinit.h" | 10 #include "prinit.h" |
11 #include "seccomon.h" | 11 #include "seccomon.h" |
12 #include "secerr.h" | 12 #include "secerr.h" |
13 #include "ssl.h" | 13 #include "ssl.h" |
14 #include "sslimpl.h" | 14 #include "sslimpl.h" |
15 | 15 |
16 static int ssl_inited = 0; | 16 static int ssl_inited = 0; |
17 | 17 |
18 SECStatus | 18 SECStatus |
19 ssl_Init(void) | 19 ssl_Init(void) |
20 { | 20 { |
21 if (!ssl_inited) { | 21 if (!ssl_inited) { |
22 if (ssl_InitializePRErrorTable() != SECSuccess) { | 22 if (ssl_InitializePRErrorTable() != SECSuccess) { |
23 PORT_SetError(SEC_ERROR_NO_MEMORY); | 23 PORT_SetError(SEC_ERROR_NO_MEMORY); |
24 return (SECFailure); | 24 return (SECFailure); |
25 } | 25 } |
26 ssl_inited = 1; | 26 ssl_inited = 1; |
27 } | 27 } |
28 return SECSuccess; | 28 return SECSuccess; |
29 } | 29 } |
OLD | NEW |