]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add support to eap_peer for client cert and CA cert on smartcard and in
authorDavid Smith <dds@google.com>
Fri, 23 May 2008 07:52:49 +0000 (10:52 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 23 May 2008 07:52:49 +0000 (10:52 +0300)
phase2 auth.

src/eap_peer/eap_config.h
src/eap_peer/eap_tls_common.c

index f07e83b57d86ccd05ea09c9bd2230e26e31b4cfc..6f1e76508f3c696d08f6d693d96e45be11151c73 100644 (file)
@@ -416,6 +416,44 @@ struct eap_peer_config {
         */
        char *key_id;
 
+       /**
+        * cert_id - Cert ID for OpenSSL engine
+        *
+        * This is used if the certificate operations for EAP-TLS are performed
+        * using a smartcard.
+        */
+       char *cert_id;
+
+       /**
+        * ca_cert_id - CA Cert ID for OpenSSL engine
+        *
+        * This is used if the CA certificate for EAP-TLS is on a smartcard.
+        */
+       char *ca_cert_id;
+
+       /**
+        * key2_id - Key ID for OpenSSL engine (phase2)
+        *
+        * This is used if private key operations for EAP-TLS are performed
+        * using a smartcard.
+        */
+       char *key2_id;
+
+       /**
+        * cert2_id - Cert ID for OpenSSL engine (phase2)
+        *
+        * This is used if the certificate operations for EAP-TLS are performed
+        * using a smartcard.
+        */
+       char *cert2_id;
+
+       /**
+        * ca_cert2_id - CA Cert ID for OpenSSL engine (phase2)
+        *
+        * This is used if the CA certificate for EAP-TLS is on a smartcard.
+        */
+       char *ca_cert2_id;
+
        /**
         * otp - One-time-password
         *
index 0cff3e87d04b2543f3b05b175ccee365cb1e827b..7b8c84d390cdf363cb5adf9a4a83ef1c91d9b12c 100644 (file)
@@ -59,6 +59,8 @@ static void eap_tls_params_from_conf1(struct tls_connection_params *params,
        params->engine_id = config->engine_id;
        params->pin = config->pin;
        params->key_id = config->key_id;
+       params->cert_id = config->cert_id;
+       params->ca_cert_id = config->ca_cert_id;
 }
 
 
@@ -73,6 +75,11 @@ static void eap_tls_params_from_conf2(struct tls_connection_params *params,
        params->dh_file = (char *) config->dh_file2;
        params->subject_match = (char *) config->subject_match2;
        params->altsubject_match = (char *) config->altsubject_match2;
+       params->engine_id = config->engine_id;
+       params->pin = config->pin;
+       params->key_id = config->key2_id;
+       params->cert_id = config->cert2_id;
+       params->ca_cert_id = config->ca_cert2_id;
 }