diff options
Diffstat (limited to 'src/charon-cmd/cmd')
-rw-r--r-- | src/charon-cmd/cmd/cmd_connection.c | 8 | ||||
-rw-r--r-- | src/charon-cmd/cmd/cmd_creds.c | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/charon-cmd/cmd/cmd_connection.c b/src/charon-cmd/cmd/cmd_connection.c index ac085e131..2c0b7b9d5 100644 --- a/src/charon-cmd/cmd/cmd_connection.c +++ b/src/charon-cmd/cmd/cmd_connection.c @@ -187,6 +187,7 @@ static peer_cfg_t* create_peer_cfg(private_cmd_connection_t *this) else { ike_cfg->add_proposal(ike_cfg, proposal_create_default(PROTO_IKE)); + ike_cfg->add_proposal(ike_cfg, proposal_create_default_aead(PROTO_IKE)); } peer_cfg = peer_cfg_create("cmd", ike_cfg, CERT_SEND_IF_ASKED, UNIQUE_REPLACE, 1, /* keyingtries */ @@ -357,6 +358,8 @@ static child_cfg_t* create_child_cfg(private_cmd_connection_t *this, else { child_cfg->add_proposal(child_cfg, proposal_create_default(PROTO_ESP)); + child_cfg->add_proposal(child_cfg, + proposal_create_default_aead(PROTO_ESP)); } while (this->local_ts->remove_first(this->local_ts, (void**)&ts) == SUCCESS) { @@ -460,10 +463,9 @@ static void add_ts(private_cmd_connection_t *this, */ static void set_profile(private_cmd_connection_t *this, char *name) { - int profile; + profile_t profile; - profile = enum_from_name(profile_names, name); - if (profile == -1) + if (!enum_from_name(profile_names, name, &profile)) { DBG1(DBG_CFG, "unknown connection profile: %s", name); exit(1); diff --git a/src/charon-cmd/cmd/cmd_creds.c b/src/charon-cmd/cmd/cmd_creds.c index 7fee85d78..45d008e7b 100644 --- a/src/charon-cmd/cmd/cmd_creds.c +++ b/src/charon-cmd/cmd/cmd_creds.c @@ -72,7 +72,7 @@ static shared_key_t* callback_shared(private_cmd_creds_t *this, id_match_t *match_me, id_match_t *match_other) { shared_key_t *shared; - char *label, *pwd; + char *label, *pwd = NULL; if (type == this->prompted) { @@ -95,7 +95,9 @@ static shared_key_t* callback_shared(private_cmd_creds_t *this, default: return NULL; } +#ifdef HAVE_GETPASS pwd = getpass(label); +#endif if (!pwd || strlen(pwd) == 0) { return NULL; |