1/*************************************************************************** 2 * LPRng - An Extended Print Spooler System 3 * 4 * Copyright 1988-2003, Patrick Powell, San Diego, CA 5 * papowell@lprng.com 6 * See LICENSE for conditions of use. 7 * $Id: ssl_auth.h,v 1.1.1.1 2008/10/15 03:28:27 james26_jang Exp $ 8 ***************************************************************************/ 9 10 11 12#ifndef _SSL_AUTH_H_ 13#define _SSL_AUTH_H_ 1 14 15#include <openssl/ssl.h> 16#include <openssl/err.h> 17 18 19/* PROTOTYPES */ 20char *Set_ERR_str( char *header, char *errmsg, int errlen ); 21int SSL_Initialize_ctx( 22 SSL_CTX **ctx_ret, 23 char *errmsg, int errlen ); 24void Destroy_ctx(SSL_CTX *ctx); 25int Open_SSL_connection( int sock, SSL_CTX *ctx, SSL **ssl_ret, 26 struct line_list *info, char *errmsg, int errlen ); 27int Accept_SSL_connection( int sock, int timeout, SSL_CTX *ctx, SSL **ssl_ret, 28 struct line_list *info, char *errmsg, int errlen ); 29int Write_SSL_connection( int timeout, SSL *ssl, char *buffer, int len, 30 char *errmsg, int errlen ); 31int Gets_SSL_connection( int timeout, SSL *ssl, char *inbuffer, int len, 32 char *errmsg, int errlen ); 33int Read_SSL_connection( int timeout, SSL *ssl, char *inbuffer, int *len, 34 char *errmsg, int errlen ); 35int Close_SSL_connection( int sock, SSL *ssl ); 36const char * Error_SSL_name( int i ); 37int Ssl_send( int *sock, 38 int transfer_timeout, 39 char *tempfile, 40 char *errmsg, int errlen, 41 struct security *security, struct line_list *info ); 42int Ssl_receive( int *sock, 43 char *user, char *jobsize, int from_server, char *authtype, 44 struct line_list *info, 45 char *errmsg, int errlen, 46 struct line_list *header_info, 47 struct security *security, char *tempfile ); 48 49#endif 50