Add opaque ID structure.
[openssl.git] / crypto / x509 / x509_vfy.c
index 7d92a5b..ab9bf8d 100644 (file)
@@ -69,6 +69,7 @@
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
 #include <openssl/objects.h>
+#include "vpm_int.h"
 
 /* CRL score values */
 
@@ -736,18 +737,19 @@ static int check_id_error(X509_STORE_CTX *ctx, int errcode)
 static int check_id(X509_STORE_CTX *ctx)
        {
        X509_VERIFY_PARAM *vpm = ctx->param;
+       X509_VERIFY_PARAM_ID *id = vpm->id;
        X509 *x = ctx->cert;
-       if (vpm->host && !X509_check_host(x, vpm->host, vpm->hostlen, 0))
+       if (id->host && !X509_check_host(x, id->host, id->hostlen, 0))
                {
                if (!check_id_error(ctx, X509_V_ERR_HOSTNAME_MISMATCH))
                        return 0;
                }
-       if (vpm->email && !X509_check_email(x, vpm->email, vpm->emaillen, 0))
+       if (id->email && !X509_check_email(x, id->email, id->emaillen, 0))
                {
                if (!check_id_error(ctx, X509_V_ERR_EMAIL_MISMATCH))
                        return 0;
                }
-       if (vpm->ip && !X509_check_ip(x, vpm->ip, vpm->iplen, 0))
+       if (id->ip && !X509_check_ip(x, id->ip, id->iplen, 0))
                {
                if (!check_id_error(ctx, X509_V_ERR_IP_ADDRESS_MISMATCH))
                        return 0;