moved auth_method to policy
authorAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 25 Sep 2006 05:52:13 +0000 (05:52 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 25 Sep 2006 05:52:13 +0000 (05:52 -0000)
src/charon/config/connections/connection.c
src/charon/config/connections/connection.h

index 6b8192b..3d00119 100644 (file)
 #include <utils/logger.h>
 
 /** 
- * String mappings for auth_method_t.
- */
-mapping_t auth_method_m[] = {
-       {RSA_DIGITAL_SIGNATURE, "RSA"},
-       {SHARED_KEY_MESSAGE_INTEGRITY_CODE, "SHARED_KEY"},
-       {DSS_DIGITAL_SIGNATURE, "DSS"},
-       {MAPPING_END, NULL}
-};
-
-/** 
  * String mappings for cert_policy_t.
  */
 mapping_t cert_policy_m[] = {
@@ -101,11 +91,6 @@ struct private_connection_t {
        host_t *other_host;
        
        /**
-        * Method to use for own authentication data
-        */
-       auth_method_t auth_method;
-       
-       /**
         * Interval to send DPD liveness checks on inactivity
         */
        u_int32_t dpd_delay;
@@ -251,14 +236,6 @@ static void add_proposal(private_connection_t *this, proposal_t *proposal)
 }
 
 /**
- * Implementation of connection_t.auth_method_t.
- */
-static auth_method_t get_auth_method(private_connection_t *this)
-{
-       return this->auth_method;
-}
-
-/**
  * Implementation of connection_t.get_dpd_delay.
  */
 static u_int32_t get_dpd_delay(private_connection_t *this)
@@ -384,7 +361,6 @@ connection_t * connection_create(char *name, bool ikev2,
                                                                 cert_policy_t cert_policy,
                                                                 cert_policy_t certreq_policy,
                                                                 host_t *my_host, host_t *other_host,
-                                                                auth_method_t auth_method,
                                                                 u_int32_t dpd_delay,
                                                                 u_int32_t retrans_sequences,
                                                                 u_int32_t hard_lifetime,
@@ -402,7 +378,6 @@ connection_t * connection_create(char *name, bool ikev2,
        this->public.get_proposals = (linked_list_t*(*)(connection_t*))get_proposals;
        this->public.select_proposal = (proposal_t*(*)(connection_t*,linked_list_t*))select_proposal;
        this->public.add_proposal = (void(*)(connection_t*, proposal_t*)) add_proposal;
-       this->public.get_auth_method = (auth_method_t(*)(connection_t*)) get_auth_method;
        this->public.get_dpd_delay = (u_int32_t(*)(connection_t*)) get_dpd_delay;
        this->public.get_retrans_seq = (u_int32_t(*)(connection_t*)) get_retrans_seq;
        this->public.get_dh_group = (diffie_hellman_group_t(*)(connection_t*)) get_dh_group;
@@ -420,7 +395,6 @@ connection_t * connection_create(char *name, bool ikev2,
        this->certreq_policy = certreq_policy;
        this->my_host = my_host;
        this->other_host = other_host;
-       this->auth_method = auth_method;
        this->dpd_delay = dpd_delay;
        this->retrans_sequences = retrans_sequences;
        this->hard_lifetime = hard_lifetime;
index c425590..ffe22ad 100644 (file)
 #include <config/proposal.h>
 #include <crypto/diffie_hellman.h>
 
-
-typedef enum auth_method_t auth_method_t;
-
-/**
- * AUTH Method to use.
- * 
- * @ingroup config
- */
-enum auth_method_t {
-       /**
-        * Computed as specified in section 2.15 of RFC using 
-        * an RSA private key over a PKCS#1 padded hash.
-        */
-       RSA_DIGITAL_SIGNATURE = 1,
-       
-       /** 
-        * Computed as specified in section 2.15 of RFC using the 
-        * shared key associated with the identity in the ID payload 
-        * and the negotiated prf function
-        */
-       SHARED_KEY_MESSAGE_INTEGRITY_CODE = 2,
-       
-       /**
-        * Computed as specified in section 2.15 of RFC using a 
-        * DSS private key over a SHA-1 hash.
-        */
-       DSS_DIGITAL_SIGNATURE = 3,
-};
-
-/**
- * string mappings for auth method.
- * 
- * @ingroup config
- */
-extern mapping_t auth_method_m[];
-
-
 typedef enum cert_policy_t cert_policy_t;
 
 /**
@@ -91,7 +54,7 @@ enum cert_policy_t {
 };
 
 /**
- * string mappings for certpolicy_t.
+ * string mappings for certpolic\ 1_t.
  * 
  * @ingroup config
  */
@@ -164,14 +127,6 @@ struct connection_t {
        proposal_t *(*select_proposal) (connection_t *this, linked_list_t *proposals);
        
        /**
-        * @brief Get the authentication method to use.
-        * 
-        * @param this          calling object
-        * @return                      authentication method
-        */
-       auth_method_t (*get_auth_method) (connection_t *this);
-       
-       /**
         * @brief Get the DPD check interval.
         * 
         * @param this          calling object
@@ -313,7 +268,6 @@ struct connection_t {
  * @param cert_req_policy      certificate request send policy
  * @param my_host                      host_t representing local address
  * @param other_host           host_t representing remote address
- * @param auth_method          Authentication method to use for our(!) auth data
  * @param dpd_delay                    interval of DPD liveness checks
  * @param retrans_sequences    number of retransmit sequences to use
  * @param hard_lifetime                lifetime before deleting an IKE_SA
@@ -326,7 +280,6 @@ struct connection_t {
 connection_t * connection_create(char *name, bool ikev2,
                                                                 cert_policy_t cert_pol, cert_policy_t req_pol,
                                                                 host_t *my_host, host_t *other_host,
-                                                                auth_method_t auth_method,
                                                                 u_int32_t dpd_delay, u_int32_t retrans_sequences,
                                                                 u_int32_t hard_lifetime, u_int32_t soft_lifetime, 
                                                                 u_int32_t jitter);