Parent Directory
|
Revision Log
Package all media, etc. needed for Public demo system into one tree
1 /* 2 * This program is free software; you can redistribute it and/or modify 3 * it under the terms of the GNU General Public License as published by 4 * the Free Software Foundation; either version 2 of the License, or 5 * (at your option) any later version. 6 * 7 * This program is distributed in the hope that it will be useful, 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * GNU General Public License for more details. 11 * 12 * You should have received a copy of the GNU General Public License 13 * along with this program; if not, write to the Free Software 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 * 16 * Author : Gundu RAO - 16 Jul 2004 17 * From Hewlett Packard Company. 18 */ 19 20 #define SSL_MAIN 21 #include "sslcommon.h" 22 23 int init_OpenSSL(void) { 24 if (!Thread_setup() || !SSL_library_init() ) { 25 return (-1) ; 26 } 27 SSL_load_error_strings(); 28 return 1; 29 } 30 31 32 SSL_CTX *setup_ssl_context(SSL_METHOD *method) { 33 SSL_CTX *ctx; 34 35 if ((ctx = SSL_CTX_new(method)) == NULL) { 36 SSL_ERROR(); 37 } 38 39 return ctx; 40 } 41 42 int SSL_ERROR(void) { 43 int flags; 44 int line; 45 const char *data; 46 const char *file; 47 unsigned long code; 48 49 code = ERR_get_error_line_data(&file,&line,&data,&flags); 50 while (code) { 51 char temp_buffer[1024]; 52 53 sprintf(temp_buffer,"Error code: %lu in %s Line %d.\n",code,file,line); 54 /*WARNING_P1("SSL Error : %s\n",temp_buffer);*/ 55 56 if (data && (flags & ERR_TXT_STRING)) { 57 sprintf(temp_buffer,"Error data : %s\n",data); 58 /*WARNING_P1("SSL Error : %s\n",temp_buffer);*/ 59 } 60 code = ERR_get_error_line_data(&file,&line,&data,&flags); 61 } 62 return 1; 63 } 64
| No admin address has been configured | ViewVC Help |
| Powered by ViewVC 1.0.8 |