| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Function to set error code only when meaningful error has not already | 2 * Function to set error code only when meaningful error has not already |
| 3 * been set. | 3 * been set. |
| 4 * | 4 * |
| 5 * ***** BEGIN LICENSE BLOCK ***** | 5 * This Source Code Form is subject to the terms of the Mozilla Public |
| 6 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 6 * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 7 * | 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 8 * The contents of this file are subject to the Mozilla Public License Version | 8 /* $Id: sslerr.c,v 1.5 2012/04/25 14:50:12 gerv%gerv.net Exp $ */ |
| 9 * 1.1 (the "License"); you may not use this file except in compliance with | |
| 10 * the License. You may obtain a copy of the License at | |
| 11 * http://www.mozilla.org/MPL/ | |
| 12 * | |
| 13 * Software distributed under the License is distributed on an "AS IS" basis, | |
| 14 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
| 15 * for the specific language governing rights and limitations under the | |
| 16 * License. | |
| 17 * | |
| 18 * The Original Code is the Netscape security libraries. | |
| 19 * | |
| 20 * The Initial Developer of the Original Code is | |
| 21 * Netscape Communications Corporation. | |
| 22 * Portions created by the Initial Developer are Copyright (C) 1994-2000 | |
| 23 * the Initial Developer. All Rights Reserved. | |
| 24 * | |
| 25 * Contributor(s): | |
| 26 * | |
| 27 * Alternatively, the contents of this file may be used under the terms of | |
| 28 * either the GNU General Public License Version 2 or later (the "GPL"), or | |
| 29 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), | |
| 30 * in which case the provisions of the GPL or the LGPL are applicable instead | |
| 31 * of those above. If you wish to allow use of your version of this file only | |
| 32 * under the terms of either the GPL or the LGPL, and not to allow others to | |
| 33 * use your version of this file under the terms of the MPL, indicate your | |
| 34 * decision by deleting the provisions above and replace them with the notice | |
| 35 * and other provisions required by the GPL or the LGPL. If you do not delete | |
| 36 * the provisions above, a recipient may use your version of this file under | |
| 37 * the terms of any one of the MPL, the GPL or the LGPL. | |
| 38 * | |
| 39 * ***** END LICENSE BLOCK ***** */ | |
| 40 /* $Id: sslerr.c,v 1.4 2004/04/27 23:04:39 gerv%gerv.net Exp $ */ | |
| 41 | 9 |
| 42 #include "prerror.h" | 10 #include "prerror.h" |
| 43 #include "secerr.h" | 11 #include "secerr.h" |
| 44 #include "sslerr.h" | 12 #include "sslerr.h" |
| 45 #include "seccomon.h" | 13 #include "seccomon.h" |
| 46 | 14 |
| 47 /* look at the current value of PR_GetError, and evaluate it to see | 15 /* look at the current value of PR_GetError, and evaluate it to see |
| 48 * if it is meaningful or meaningless (out of context). | 16 * if it is meaningful or meaningless (out of context). |
| 49 * If it is meaningless, replace it with the hiLevelError. | 17 * If it is meaningless, replace it with the hiLevelError. |
| 50 * Returns the chosen error value. | 18 * Returns the chosen error value. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 65 case SSL_ERROR_BAD_CLIENT: | 33 case SSL_ERROR_BAD_CLIENT: |
| 66 case SSL_ERROR_BAD_SERVER: | 34 case SSL_ERROR_BAD_SERVER: |
| 67 case SSL_ERROR_SESSION_NOT_FOUND: | 35 case SSL_ERROR_SESSION_NOT_FOUND: |
| 68 PORT_SetError(hiLevelError); | 36 PORT_SetError(hiLevelError); |
| 69 return hiLevelError; | 37 return hiLevelError; |
| 70 | 38 |
| 71 default: /* leave the majority of error codes alone. */ | 39 default: /* leave the majority of error codes alone. */ |
| 72 return oldErr; | 40 return oldErr; |
| 73 } | 41 } |
| 74 } | 42 } |
| OLD | NEW |