cleanup
authorColin Leroy <colin@colino.net>
Mon, 9 Dec 2002 13:25:33 +0000 (13:25 +0000)
committerColin Leroy <colin@colino.net>
Mon, 9 Dec 2002 13:25:33 +0000 (13:25 +0000)
ChangeLog.claws
configure.in
src/common/ssl_certificate.c

index 43c80ac..a965fb0 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-09 [colin]     0.8.6claws87
+
+       * src/ssl_certificate.c
+               cleanup
+
 2002-12-09 [colin]     0.8.6claws86
 
        * src/ssl.c
index 3de924d..9bd30e3 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws86
+EXTRA_VERSION=claws87
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index fff5d11..837d0b4 100644 (file)
@@ -296,7 +296,6 @@ char *ssl_certificate_check_signer (X509 *cert)
        X509_STORE_CTX store_ctx;
        X509_STORE *store;
        int ok = 0;
-       char *cert_file = NULL;
        char *err_msg = NULL;
 
        store = X509_STORE_new();
@@ -304,20 +303,14 @@ char *ssl_certificate_check_signer (X509 *cert)
                printf("Can't create X509_STORE\n");
                return NULL;
        }
-       if (X509_STORE_set_default_paths(store)) 
-               ok++;
-       if (X509_STORE_load_locations(store, cert_file, NULL))
-               ok++;
-
-       if (ok == 0) {
+       if (!X509_STORE_set_default_paths(store)) {
                X509_STORE_free (store);
                return g_strdup(_("Can't load X509 default paths"));
        }
        
        X509_STORE_CTX_init (&store_ctx, store, cert, NULL);
-       ok = X509_verify_cert (&store_ctx);
-       
-       if (ok == 0) {
+
+       if(!X509_verify_cert (&store_ctx)) {
                err_msg = g_strdup(X509_verify_cert_error_string(
                                        X509_STORE_CTX_get_error(&store_ctx)));
                debug_print("Can't check signer: %s\n", err_msg);