Commit 966e75e2 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

stylistic improvements

Submitted by:   Madhu Mathihalli <madhusudan_mathihalli@hp.com>
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@97298 13f79535-47bb-0310-9956-ffa450edef68
parent e6773f3b
Loading
Loading
Loading
Loading
+6 −2
Changes for ssl_util_ssl.c: 6 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -131,6 +131,7 @@ X509 *SSL_read_X509(char* filename, X509 **x509, int (*cb)(char*,int,int,void*))
        bioS = BIO_push(bioF, bioS);
        rc = d2i_X509_bio(bioS, NULL);
        BIO_free_all(bioS);

        if (rc == NULL) {
            /* 3. try plain DER */
            if ((bioS=BIO_new_file(filename, "r")) == NULL)
@@ -181,6 +182,7 @@ EVP_PKEY *SSL_read_PrivateKey(char* filename, EVP_PKEY **key, int (*cb)(char*,in
        bioS = BIO_push(bioF, bioS);
        rc = d2i_PrivateKey_bio(bioS, NULL);
        BIO_free_all(bioS);

        if (rc == NULL) {
            /* 3. try plain DER */
            if ((bioS = BIO_new_file(filename, "r")) == NULL)
@@ -239,14 +241,16 @@ X509_STORE *SSL_X509_STORE_create(char *cpFile, char *cpPath)
    if ((pStore = X509_STORE_new()) == NULL)
        return NULL;
    if (cpFile != NULL) {
        if ((pLookup = X509_STORE_add_lookup(pStore, X509_LOOKUP_file())) == NULL) {
        pLookup = X509_STORE_add_lookup(pStore, X509_LOOKUP_file());
        if (pLookup == NULL) {
            X509_STORE_free(pStore);
            return NULL;
        }
        X509_LOOKUP_load_file(pLookup, cpFile, X509_FILETYPE_PEM);
    }
    if (cpPath != NULL) {
        if ((pLookup = X509_STORE_add_lookup(pStore, X509_LOOKUP_hash_dir())) == NULL) {
        pLookup = X509_STORE_add_lookup(pStore, X509_LOOKUP_hash_dir());
        if (pLookup == NULL) {
            X509_STORE_free(pStore);
            return NULL;
        }