diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-03-22 14:57:49 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-03-22 14:57:49 +0000 |
commit | 683827f6b98e43561baf3d88b21c3d586ec0a65c (patch) | |
tree | 392ea037704437348648e89ba9aa49432f93d376 /lib/gnutls_x509.c | |
parent | 2f035aae4b0eb01794fc730d4064836d190e471d (diff) | |
download | gnutls-683827f6b98e43561baf3d88b21c3d586ec0a65c.tar.gz |
*** empty log message ***
Diffstat (limited to 'lib/gnutls_x509.c')
-rw-r--r-- | lib/gnutls_x509.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c index b476b0e656..e85e7adedc 100644 --- a/lib/gnutls_x509.c +++ b/lib/gnutls_x509.c @@ -700,87 +700,6 @@ static int read_key_file(gnutls_certificate_credentials res, const char *keyfile } /** - * gnutls_certificate_free_keys - Used to free all the keys from a gnutls_certificate_credentials structure - * @sc: is an &gnutls_certificate_credentials structure. - * - * This function will delete all the keys and the certificates associated - * with the given credentials. This function must not be called when a - * TLS negotiation that uses the credentials is in progress. - * - **/ -void gnutls_certificate_free_keys(gnutls_certificate_credentials sc) -{ - uint i, j; - - for (i = 0; i < sc->ncerts; i++) { - for (j = 0; j < sc->cert_list_length[i]; j++) { - _gnutls_free_cert( &sc->cert_list[i][j]); - } - gnutls_free( sc->cert_list[i]); - } - - gnutls_free(sc->cert_list_length); - sc->cert_list_length = NULL; - - gnutls_free(sc->cert_list); - sc->cert_list = NULL; - - for (i = 0; i < sc->ncerts; i++) { - _gnutls_privkey_deinit( &sc->pkey[i]); - } - - gnutls_free( sc->pkey); - sc->pkey = NULL; - - sc->ncerts = 0; - -} - -/** - * gnutls_certificate_free_cas - Used to free all the CAs from a gnutls_certificate_credentials structure - * @sc: is an &gnutls_certificate_credentials structure. - * - * This function will delete all the CAs associated - * with the given credentials. - * - **/ -void gnutls_certificate_free_cas(gnutls_certificate_credentials sc) -{ - uint j; - - for (j = 0; j < sc->x509_ncas; j++) { - gnutls_x509_crt_deinit( sc->x509_ca_list[j]); - } - - sc->x509_ncas = 0; - - gnutls_free( sc->x509_ca_list); - sc->x509_ca_list = NULL; -} - -/** - * gnutls_certificate_free_crls - Used to free all the CRLs from a gnutls_certificate_credentials structure - * @sc: is an &gnutls_certificate_credentials structure. - * - * This function will delete all the CRLs associated - * with the given credentials. - * - **/ -void gnutls_certificate_free_crls(gnutls_certificate_credentials sc) -{ - uint j; - - for (j = 0; j < sc->x509_ncrls; j++) { - gnutls_x509_crl_deinit( sc->x509_crl_list[j]); - } - - sc->x509_ncrls = 0; - - gnutls_free( sc->x509_crl_list); - sc->x509_crl_list = NULL; -} - -/** * gnutls_certificate_set_x509_key_mem - Used to set keys in a gnutls_certificate_credentials structure * @res: is an &gnutls_certificate_credentials structure. * @CERT: contains a certificate list (path) for the specified private key |