diff options
author | Ben Laurie <ben@openssl.org> | 1999-05-30 14:13:19 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-05-30 14:13:19 +0000 |
commit | 838d25a1ec0011fde245a22ac1cf6cddc518ddfb (patch) | |
tree | 8b943770d7311a1f7035d305c1bc6aef20f4a337 /ssl | |
parent | 5132cadf21d206f2fe6d51febf33b1c545dc0c39 (diff) |
More safe stack.
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl.h | 2 | ||||
-rw-r--r-- | ssl/ssl_cert.c | 14 |
2 files changed, 8 insertions, 8 deletions
@@ -1025,7 +1025,7 @@ long SSL_get_default_timeout(SSL *s); int SSL_library_init(void ); char *SSL_CIPHER_description(SSL_CIPHER *,char *buf,int size); -STACK *SSL_dup_CA_list(STACK *sk); +STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk); SSL *SSL_dup(SSL *ssl); diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index 9a8a8cc816..ec2eb6139d 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -452,19 +452,19 @@ static void set_client_CA_list(STACK_OF(X509_NAME) **ca_list,STACK_OF(X509_NAME) *ca_list=list; } -STACK *SSL_dup_CA_list(STACK *sk) +STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk) { int i; - STACK *ret; + STACK_OF(X509_NAME) *ret; X509_NAME *name; - ret=sk_new_null(); - for (i=0; i<sk_num(sk); i++) + ret=sk_X509_NAME_new_null(); + for (i=0; i<sk_X509_NAME_num(sk); i++) { - name=X509_NAME_dup((X509_NAME *)sk_value(sk,i)); - if ((name == NULL) || !sk_push(ret,(char *)name)) + name=X509_NAME_dup(sk_X509_NAME_value(sk,i)); + if ((name == NULL) || !sk_X509_NAME_push(ret,name)) { - sk_pop_free(ret,X509_NAME_free); + sk_X509_NAME_pop_free(ret,X509_NAME_free); return(NULL); } } |