From a49034aba9f9adf4278e23ab7dc8cb8bb1b83892 Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Sat, 6 Mar 1999 14:49:11 +0000 Subject: [PATCH] Fix names of cert stack functions. --- ssl/ssl.err | 4 ++-- ssl/ssl.h | 14 ++++++++------ ssl/ssl_cert.c | 12 ++++++------ ssl/ssl_err.c | 4 ++-- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/ssl/ssl.err b/ssl/ssl.err index 11a857a7f7..413124f7f5 100644 --- a/ssl/ssl.err +++ b/ssl/ssl.err @@ -62,8 +62,8 @@ #define SSL_F_SSL3_SETUP_KEY_BLOCK 157 #define SSL_F_SSL3_WRITE_BYTES 158 #define SSL_F_SSL3_WRITE_PENDING 159 -#define SSL_F_SSL_ADD_CERT_DIR_TO_STACK 215 -#define SSL_F_SSL_ADD_CERT_FILE_TO_STACK 216 +#define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK 215 +#define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK 216 #define SSL_F_SSL_BAD_METHOD 160 #define SSL_F_SSL_BYTES_TO_CIPHER_LIST 161 #define SSL_F_SSL_CERT_INSTANTIATE 214 diff --git a/ssl/ssl.h b/ssl/ssl.h index 83191cb375..bd9ac8f9af 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h @@ -858,8 +858,10 @@ int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, char *file, int type); int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, char *file, int type); int SSL_CTX_use_certificate_file(SSL_CTX *ctx, char *file, int type); STACK * SSL_load_client_CA_file(char *file); -int SSL_add_cert_file_to_stack(STACK *stackCAs,const char *file); -int SSL_add_cert_dir_to_stack(STACK *stackCAs,const char *dir); +int SSL_add_file_cert_subjects_to_stack(STACK *stackCAs, + const char *file); +int SSL_add_dir_cert_subjects_to_stack(STACK *stackCAs, + const char *dir); #endif void ERR_load_SSL_strings(void ); @@ -1112,8 +1114,8 @@ int SSL_CTX_use_RSAPrivateKey_file(); int SSL_CTX_use_PrivateKey_file(); int SSL_CTX_use_certificate_file(); STACK * SSL_load_client_CA_file(); -int SSL_add_cert_file_to_stack(); -int SSL_add_cert_dir_to_stack(); +int SSL_add_file_cert_subjects_to_stack(); +int SSL_add_dir_cert_subjects_to_stack(); #endif void ERR_load_SSL_strings(); @@ -1348,8 +1350,8 @@ void SSL_set_tmp_dh_callback(); #define SSL_F_SSL3_SETUP_KEY_BLOCK 157 #define SSL_F_SSL3_WRITE_BYTES 158 #define SSL_F_SSL3_WRITE_PENDING 159 -#define SSL_F_SSL_ADD_CERT_DIR_TO_STACK 215 -#define SSL_F_SSL_ADD_CERT_FILE_TO_STACK 216 +#define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK 215 +#define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK 216 #define SSL_F_SSL_BAD_METHOD 160 #define SSL_F_SSL_BYTES_TO_CIPHER_LIST 161 #define SSL_F_SSL_CERT_INSTANTIATE 214 diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index 3612486b67..cc3df56830 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -371,7 +371,7 @@ err: * certs may have been added to \c stack. */ -int SSL_add_cert_file_to_stack(STACK *stack,const char *file) +int SSL_add_file_cert_subjects_to_stack(STACK *stack,const char *file) { BIO *in; X509 *x=NULL; @@ -385,7 +385,7 @@ int SSL_add_cert_file_to_stack(STACK *stack,const char *file) if (in == NULL) { - SSLerr(SSL_F_SSL_ADD_CERT_FILE_TO_STACK,ERR_R_MALLOC_FAILURE); + SSLerr(SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK,ERR_R_MALLOC_FAILURE); goto err; } @@ -433,7 +433,7 @@ err: #ifndef WIN32 -int SSL_add_cert_dir_to_stack(STACK *stack,const char *dir) +int SSL_add_dir_cert_subjects_to_stack(STACK *stack,const char *dir) { DIR *d=opendir(dir); struct dirent *dstruct; @@ -441,7 +441,7 @@ int SSL_add_cert_dir_to_stack(STACK *stack,const char *dir) /* Note that a side effect is that the CAs will be sorted by name */ if(!d) { - SSLerr(SSL_F_SSL_ADD_CERT_DIR_TO_STACK,ERR_R_MALLOC_FAILURE); + SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,ERR_R_MALLOC_FAILURE); return 0; } @@ -451,12 +451,12 @@ int SSL_add_cert_dir_to_stack(STACK *stack,const char *dir) if(strlen(dir)+strlen(dstruct->d_name)+2 > sizeof buf) { - SSLerr(SSL_F_SSL_ADD_CERT_DIR_TO_STACK,SSL_R_PATH_TOO_LONG); + SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG); return 0; } sprintf(buf,"%s/%s",dir,dstruct->d_name); - if(!SSL_add_cert_file_to_stack(stack,buf)) + if(!SSL_add_file_cert_subjects_to_stack(stack,buf)) return 0; } diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c index 137ac4af32..a255a23f96 100644 --- a/ssl/ssl_err.c +++ b/ssl/ssl_err.c @@ -124,8 +124,8 @@ static ERR_STRING_DATA SSL_str_functs[]= {ERR_PACK(0,SSL_F_SSL3_SETUP_KEY_BLOCK,0), "SSL3_SETUP_KEY_BLOCK"}, {ERR_PACK(0,SSL_F_SSL3_WRITE_BYTES,0), "SSL3_WRITE_BYTES"}, {ERR_PACK(0,SSL_F_SSL3_WRITE_PENDING,0), "SSL3_WRITE_PENDING"}, -{ERR_PACK(0,SSL_F_SSL_ADD_CERT_DIR_TO_STACK,0), "SSL_add_cert_dir_to_stack"}, -{ERR_PACK(0,SSL_F_SSL_ADD_CERT_FILE_TO_STACK,0), "SSL_add_cert_file_to_stack"}, +{ERR_PACK(0,SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,0), "SSL_add_dir_cert_subjects_to_stack"}, +{ERR_PACK(0,SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK,0), "SSL_add_file_cert_subjects_to_stack"}, {ERR_PACK(0,SSL_F_SSL_BAD_METHOD,0), "SSL_BAD_METHOD"}, {ERR_PACK(0,SSL_F_SSL_BYTES_TO_CIPHER_LIST,0), "SSL_BYTES_TO_CIPHER_LIST"}, {ERR_PACK(0,SSL_F_SSL_CERT_INSTANTIATE,0), "SSL_CERT_INSTANTIATE"},