OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
ssl_cert.c File Reference
#include <stdio.h>
#include "e_os.h"
#include <sys/types.h>
#include "o_dir.h"
#include <openssl/objects.h>
#include <openssl/bio.h>
#include <openssl/pem.h>
#include <openssl/x509v3.h>
#include <openssl/dh.h>
#include <openssl/bn.h>
#include "ssl_locl.h"

Go to the source code of this file.

Functions

int SSL_get_ex_data_X509_STORE_CTX_idx (void)
 
CERTssl_cert_new (void)
 
CERTssl_cert_dup (CERT *cert)
 
void ssl_cert_free (CERT *c)
 
int ssl_cert_inst (CERT **o)
 
SESS_CERTssl_sess_cert_new (void)
 
void ssl_sess_cert_free (SESS_CERT *sc)
 
int ssl_set_peer_cert_type (SESS_CERT *sc, int type)
 
int ssl_verify_cert_chain (SSL *s, STACK_OF(X509)*sk)
 
 STACK_OF (X509_NAME)
 
void SSL_set_client_CA_list (SSL *s, STACK_OF(X509_NAME)*name_list)
 
void SSL_CTX_set_client_CA_list (SSL_CTX *ctx, STACK_OF(X509_NAME)*name_list)
 
int SSL_add_client_CA (SSL *ssl, X509 *x)
 
int SSL_CTX_add_client_CA (SSL_CTX *ctx, X509 *x)
 
int SSL_add_file_cert_subjects_to_stack (STACK_OF(X509_NAME)*stack, const char *file)
 
int SSL_add_dir_cert_subjects_to_stack (STACK_OF(X509_NAME)*stack, const char *dir)
 

Function Documentation

int SSL_add_client_CA ( SSL ssl,
X509 x 
)

Definition at line 648 of file ssl_cert.c.

int SSL_add_dir_cert_subjects_to_stack ( STACK_OF(X509_NAME)*  stack,
const char *  dir 
)

Add a directory of certs to a stack.

Parameters
stackthe stack to append to.
dirthe directory to append from. All files in this directory will be examined as potential certs. Any that are acceptable to SSL_add_dir_cert_subjects_to_stack() that are not already in the stack will be included.
Returns
1 for success, 0 for failure. Note that in the case of failure some certs may have been added to stack.

Definition at line 805 of file ssl_cert.c.

int SSL_add_file_cert_subjects_to_stack ( STACK_OF(X509_NAME)*  stack,
const char *  file 
)

Add a file of certs to a stack.

Parameters
stackthe stack to add to.
filethe file to add from. All certs in this file that are not already in the stack will be added.
Returns
1 for success, 0 for failure. Note that in the case of failure some certs may have been added to stack.

Definition at line 742 of file ssl_cert.c.

CERT* ssl_cert_dup ( CERT cert)

Definition at line 196 of file ssl_cert.c.

void ssl_cert_free ( CERT c)

Definition at line 360 of file ssl_cert.c.

int ssl_cert_inst ( CERT **  o)

Definition at line 404 of file ssl_cert.c.

CERT* ssl_cert_new ( void  )

Definition at line 178 of file ssl_cert.c.

int SSL_CTX_add_client_CA ( SSL_CTX ctx,
X509 x 
)

Definition at line 653 of file ssl_cert.c.

void SSL_CTX_set_client_CA_list ( SSL_CTX ctx,
STACK_OF(X509_NAME)*  name_list 
)

Definition at line 600 of file ssl_cert.c.

int SSL_get_ex_data_X509_STORE_CTX_idx ( void  )

Definition at line 135 of file ssl_cert.c.

void ssl_sess_cert_free ( SESS_CERT sc)

Definition at line 451 of file ssl_cert.c.

SESS_CERT* ssl_sess_cert_new ( void  )

Definition at line 433 of file ssl_cert.c.

void SSL_set_client_CA_list ( SSL s,
STACK_OF(X509_NAME)*  name_list 
)

Definition at line 595 of file ssl_cert.c.

int ssl_set_peer_cert_type ( SESS_CERT sc,
int  type 
)

Definition at line 503 of file ssl_cert.c.

int ssl_verify_cert_chain ( SSL s,
STACK_OF(X509)*  sk 
)

Definition at line 509 of file ssl_cert.c.

STACK_OF ( X509_NAME  )

Load CA certs from a file into a ::STACK. Note that it is somewhat misnamed; it doesn't really have anything to do with clients (except that a common use for a stack of CAs is to send it to the client). Actually, it doesn't have much to do with CAs, either, since it will load any old cert.

Parameters
filethe file containing one or more certs.
Returns
a ::STACK containing the certs.

Definition at line 576 of file ssl_cert.c.