RT2841: Extra return in check_issued
[openssl.git] / crypto / x509 / x509_vfy.c
index 32dd135846dfd8ea1bdcf86647bdb31b4e67055e..acacb257c99553e8fbdaeb7ca42cdfd5ddbe63f6 100644 (file)
@@ -495,7 +495,6 @@ static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer)
        ctx->current_cert = x;
        ctx->current_issuer = issuer;
        return ctx->verify_cb(0, ctx);
        ctx->current_cert = x;
        ctx->current_issuer = issuer;
        return ctx->verify_cb(0, ctx);
-       return 0;
 }
 
 /* Alternative lookup method: look from a STACK stored in other_ctx */
 }
 
 /* Alternative lookup method: look from a STACK stored in other_ctx */
@@ -723,12 +722,13 @@ static int check_hosts(X509 *x, X509_VERIFY_PARAM_ID *id)
        {
        int i;
        int n = sk_OPENSSL_STRING_num(id->hosts);
        {
        int i;
        int n = sk_OPENSSL_STRING_num(id->hosts);
-       unsigned char *name;
+       char *name;
 
        for (i = 0; i < n; ++i)
                {
 
        for (i = 0; i < n; ++i)
                {
-               name = (unsigned char *)sk_OPENSSL_STRING_value(id->hosts, i);
-               if (X509_check_host(x, name, 0, id->hostflags) > 0)
+               name = sk_OPENSSL_STRING_value(id->hosts, i);
+               if (X509_check_host(x, name, 0, id->hostflags,
+                                   &id->peername) > 0)
                        return 1;
                }
        return n == 0;
                        return 1;
                }
        return n == 0;