]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
doc update
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 16 Apr 2014 21:08:52 +0000 (23:08 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 16 Apr 2014 21:08:52 +0000 (23:08 +0200)
lib/x509/verify-high.c

index 17f50a84c6b4d3ab5c78ab8521455f4d85ac8f96..17622746a0d8b288ead7523c68e43f586d5e34e5 100644 (file)
@@ -100,9 +100,12 @@ gnutls_x509_trust_list_init(gnutls_x509_trust_list_t * list,
 /**
  * gnutls_x509_trust_list_deinit:
  * @list: The structure to be deinitialized
- * @all: if non-(0) it will deinitialize all the certificates and CRLs contained in the structure.
+ * @all: if non-zero it will deinitialize all the certificates and CRLs contained in the structure.
  *
- * This function will deinitialize a trust list.
+ * This function will deinitialize a trust list. Note that the
+ * @all flag should be typically non-zero unless you have specified
+ * your certificates using gnutls_x509_trust_list_add_cas() and you
+ * want to prevent them from being deinitialized by this function.
  *
  * Since: 3.0.0
  **/
@@ -121,27 +124,30 @@ gnutls_x509_trust_list_deinit(gnutls_x509_trust_list_t list,
        gnutls_free(list->blacklisted);
 
        for (i = 0; i < list->size; i++) {
-               if (all)
+               if (all) {
                        for (j = 0; j < list->node[i].trusted_ca_size; j++) {
                                gnutls_x509_crt_deinit(list->node[i].
                                                       trusted_cas[j]);
                        }
+               }
                gnutls_free(list->node[i].trusted_cas);
 
 
-               if (all)
+               if (all) {
                        for (j = 0; j < list->node[i].crl_size; j++) {
                                gnutls_x509_crl_deinit(list->node[i].
                                                       crls[j]);
                        }
+               }
                gnutls_free(list->node[i].crls);
 
-               if (all)
+               if (all) {
                        for (j = 0; j < list->node[i].named_cert_size; j++) {
                                gnutls_x509_crt_deinit(list->node[i].
                                                       named_certs[j].
                                                       cert);
                        }
+               }
                gnutls_free(list->node[i].named_certs);
        }
 
@@ -606,7 +612,7 @@ static gnutls_x509_crt_t *sort_clist(gnutls_x509_crt_t
  * @list: The structure of the list
  * @cert: is the certificate to find issuer for
  * @issuer: Will hold the issuer if any. Should be treated as constant.
- * @flags: Use (0).
+ * @flags: Use zero.
  *
  * This function will attempt to find the issuer of the
  * given certificate.