From d06cb62e111be1ac3f09398ae559f99e4833b4bf Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Mon, 27 Feb 2017 17:04:40 +0100 Subject: lib: Split authentication from CACEP By removing authentication as part of CACEP, all policies disappear. CACEP becomes a policy-free connection establishment protocol between Application Entities. Authentication can later be added cleanly as a pure policy function when needed. --- include/ouroboros/cacep.h | 37 ++++++++++++++++--------------------- include/ouroboros/irm_config.h | 5 ----- 2 files changed, 16 insertions(+), 26 deletions(-) (limited to 'include') diff --git a/include/ouroboros/cacep.h b/include/ouroboros/cacep.h index f155023e..5ef66433 100644 --- a/include/ouroboros/cacep.h +++ b/include/ouroboros/cacep.h @@ -1,7 +1,7 @@ /* * Ouroboros - Copyright (C) 2016 - 2017 * - * The Common Application Connection Establishment Phase + * The Common Application Connection Establishment Protocol * * Sander Vrijders * Dimitri Staessens @@ -24,7 +24,7 @@ #ifndef OUROBOROS_CACEP_H #define OUROBOROS_CACEP_H -#include +#include enum proto_concrete_syntax { PROTO_GPB = 0, @@ -33,27 +33,22 @@ enum proto_concrete_syntax { }; struct conn_info{ - struct { - char * protocol; - uint32_t pref_version; - enum proto_concrete_syntax pref_syntax; - } proto; - char * name; - uint64_t addr; + char ae_name[64]; + char protocol[64]; + uint32_t pref_version; + enum proto_concrete_syntax pref_syntax; + union { + char name[64]; + uint64_t addr; + } ae; }; -int conn_info_init(struct conn_info * info); +int cacep_connect(int fd, + const struct conn_info * in, + struct conn_info * out); -void conn_info_fini(struct conn_info * info); - -struct conn_info * cacep_auth(int fd, - enum pol_cacep pc, - const struct conn_info * info, - const void * auth); - -struct conn_info * cacep_auth_wait(int fd, - enum pol_cacep pc, - const struct conn_info * info, - const void * auth); +int cacep_listen(int fd, + const struct conn_info * in, + struct conn_info * out); #endif /* OUROBOROS_CACEP_H */ diff --git a/include/ouroboros/irm_config.h b/include/ouroboros/irm_config.h index 9a05a434..5e3c84b4 100644 --- a/include/ouroboros/irm_config.h +++ b/include/ouroboros/irm_config.h @@ -47,11 +47,6 @@ enum pol_gam { COMPLETE = 0 }; -enum pol_cacep { - ANONYMOUS_AUTH = 0, - SIMPLE_AUTH -}; - struct dif_config { char * dif_name; enum ipcp_type type; -- cgit v1.2.3