summaryrefslogtreecommitdiff
path: root/ovn/utilities/ovn-sbctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'ovn/utilities/ovn-sbctl.c')
-rw-r--r--ovn/utilities/ovn-sbctl.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c
index 716289e9f..a82b04776 100644
--- a/ovn/utilities/ovn-sbctl.c
+++ b/ovn/utilities/ovn-sbctl.c
@@ -319,7 +319,8 @@ Connection commands:\n\
SSL commands:\n\
get-ssl print the SSL configuration\n\
del-ssl delete the SSL configuration\n\
- set-ssl PRIV-KEY CERT CA-CERT set the SSL configuration\n\
+ set-ssl PRIV-KEY CERT CA-CERT [SSL-PROTOS [SSL-CIPHERS]] \
+set the SSL configuration\n\
\n\
%s\
\n\
@@ -1114,6 +1115,13 @@ cmd_set_ssl(struct ctl_context *ctx)
sbrec_ssl_set_bootstrap_ca_cert(ssl, bootstrap);
+ if (ctx->argc == 5) {
+ sbrec_ssl_set_ssl_protocols(ssl, ctx->argv[4]);
+ } else if (ctx->argc == 6) {
+ sbrec_ssl_set_ssl_protocols(ssl, ctx->argv[4]);
+ sbrec_ssl_set_ssl_ciphers(ssl, ctx->argv[5]);
+ }
+
sbrec_sb_global_set_ssl(sb_global, ssl);
}
@@ -1407,8 +1415,9 @@ static const struct ctl_command_syntax sbctl_commands[] = {
/* SSL commands. */
{"get-ssl", 0, 0, "", pre_cmd_get_ssl, cmd_get_ssl, NULL, "", RO},
{"del-ssl", 0, 0, "", pre_cmd_del_ssl, cmd_del_ssl, NULL, "", RW},
- {"set-ssl", 3, 3, "PRIVATE-KEY CERTIFICATE CA-CERT", pre_cmd_set_ssl,
- cmd_set_ssl, NULL, "--bootstrap", RW},
+ {"set-ssl", 3, 5,
+ "PRIVATE-KEY CERTIFICATE CA-CERT [SSL-PROTOS [SSL-CIPHERS]]",
+ pre_cmd_set_ssl, cmd_set_ssl, NULL, "--bootstrap", RW},
{NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, RO},
};