summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/enroll.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-02-24 11:32:24 +0100
committerdimitri staessens <dimitri.staessens@ugent.be>2017-02-24 11:34:38 +0100
commit48599a14144725dedc45f7558d814950791d069d (patch)
treef169d40a128459419181cb2d83efe1916a67f5a1 /src/ipcpd/normal/enroll.c
parent41704c2379eda1124c5fc94d5589be6951e5b7ee (diff)
downloadouroboros-48599a14144725dedc45f7558d814950791d069d.tar.gz
ouroboros-48599a14144725dedc45f7558d814950791d069d.zip
Revise CACEP API
The information passed to CACEP is split between the information about the connection and the information to be used during the authentication exchange.
Diffstat (limited to 'src/ipcpd/normal/enroll.c')
-rw-r--r--src/ipcpd/normal/enroll.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ipcpd/normal/enroll.c b/src/ipcpd/normal/enroll.c
index ce6768fb..78bc4d51 100644
--- a/src/ipcpd/normal/enroll.c
+++ b/src/ipcpd/normal/enroll.c
@@ -44,7 +44,7 @@
int enroll_handle(int fd)
{
struct cdap_flow * flow;
- struct cacep_info info;
+ struct conn_info info;
cdap_key_t key;
enum cdap_opcode oc;
char * name;
@@ -61,11 +61,11 @@ int enroll_handle(int fd)
char * members_ro = MEMBERS_PATH;
char * dif_ro = DIF_PATH;
- cacep_info_init(&info);
+ conn_info_init(&info);
info.proto.protocol = strdup(CDAP_PROTO);
if (info.proto.protocol == NULL) {
- cacep_info_fini(&info);
+ conn_info_fini(&info);
return -ENOMEM;
}
@@ -75,12 +75,12 @@ int enroll_handle(int fd)
flow = cdap_flow_arr(fd, 0, ANONYMOUS_AUTH, &info);
if (flow == NULL) {
log_err("Failed to auth enrollment request.");
- cacep_info_fini(&info);
+ conn_info_fini(&info);
flow_dealloc(fd);
return -1;
}
- cacep_info_fini(&info);
+ conn_info_fini(&info);
while (!(boot_r && members_r && dif_name_r)) {
key = cdap_request_wait(flow->ci, &oc, &name, &data,
@@ -156,7 +156,7 @@ int enroll_handle(int fd)
int enroll_boot(char * dst_name)
{
struct cdap_flow * flow;
- struct cacep_info info;
+ struct conn_info info;
cdap_key_t key;
uint8_t * data;
size_t len;
@@ -170,11 +170,11 @@ int enroll_boot(char * dst_name)
char * members_ro = MEMBERS_PATH;
char * dif_ro = DIF_PATH;
- cacep_info_init(&info);
+ conn_info_init(&info);
info.proto.protocol = strdup(CDAP_PROTO);
if (info.proto.protocol == NULL) {
- cacep_info_fini(&info);
+ conn_info_fini(&info);
return -ENOMEM;
}
@@ -185,11 +185,11 @@ int enroll_boot(char * dst_name)
&info);
if (flow == NULL) {
log_err("Failed to allocate flow for enrollment request.");
- cacep_info_fini(&info);
+ conn_info_fini(&info);
return -1;
}
- cacep_info_fini(&info);
+ conn_info_fini(&info);
log_dbg("Getting boot information from %s.", dst_name);