diff options
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/servconf.c b/servconf.c index 09296c9cf..0a6cdb655 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: servconf.c,v 1.202 2010/01/13 03:48:12 djm Exp $ */ | 1 | /* $OpenBSD: servconf.c,v 1.203 2010/02/26 20:29:54 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
4 | * All rights reserved | 4 | * All rights reserved |
@@ -65,6 +65,7 @@ initialize_server_options(ServerOptions *options) | |||
65 | options->listen_addrs = NULL; | 65 | options->listen_addrs = NULL; |
66 | options->address_family = -1; | 66 | options->address_family = -1; |
67 | options->num_host_key_files = 0; | 67 | options->num_host_key_files = 0; |
68 | options->num_host_cert_files = 0; | ||
68 | options->pid_file = NULL; | 69 | options->pid_file = NULL; |
69 | options->server_key_bits = -1; | 70 | options->server_key_bits = -1; |
70 | options->login_grace_time = -1; | 71 | options->login_grace_time = -1; |
@@ -152,6 +153,7 @@ fill_default_server_options(ServerOptions *options) | |||
152 | _PATH_HOST_DSA_KEY_FILE; | 153 | _PATH_HOST_DSA_KEY_FILE; |
153 | } | 154 | } |
154 | } | 155 | } |
156 | /* No certificates by default */ | ||
155 | if (options->num_ports == 0) | 157 | if (options->num_ports == 0) |
156 | options->ports[options->num_ports++] = SSH_DEFAULT_PORT; | 158 | options->ports[options->num_ports++] = SSH_DEFAULT_PORT; |
157 | if (options->listen_addrs == NULL) | 159 | if (options->listen_addrs == NULL) |
@@ -305,7 +307,7 @@ typedef enum { | |||
305 | sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel, | 307 | sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel, |
306 | sMatch, sPermitOpen, sForceCommand, sChrootDirectory, | 308 | sMatch, sPermitOpen, sForceCommand, sChrootDirectory, |
307 | sUsePrivilegeSeparation, sAllowAgentForwarding, | 309 | sUsePrivilegeSeparation, sAllowAgentForwarding, |
308 | sZeroKnowledgePasswordAuthentication, | 310 | sZeroKnowledgePasswordAuthentication, sHostCertificate, |
309 | sDeprecated, sUnsupported | 311 | sDeprecated, sUnsupported |
310 | } ServerOpCodes; | 312 | } ServerOpCodes; |
311 | 313 | ||
@@ -424,6 +426,7 @@ static struct { | |||
424 | { "permitopen", sPermitOpen, SSHCFG_ALL }, | 426 | { "permitopen", sPermitOpen, SSHCFG_ALL }, |
425 | { "forcecommand", sForceCommand, SSHCFG_ALL }, | 427 | { "forcecommand", sForceCommand, SSHCFG_ALL }, |
426 | { "chrootdirectory", sChrootDirectory, SSHCFG_ALL }, | 428 | { "chrootdirectory", sChrootDirectory, SSHCFG_ALL }, |
429 | { "hostcertificate", sHostCertificate, SSHCFG_GLOBAL }, | ||
427 | { NULL, sBadOption, 0 } | 430 | { NULL, sBadOption, 0 } |
428 | }; | 431 | }; |
429 | 432 | ||
@@ -816,6 +819,16 @@ process_server_config_line(ServerOptions *options, char *line, | |||
816 | } | 819 | } |
817 | break; | 820 | break; |
818 | 821 | ||
822 | case sHostCertificate: | ||
823 | intptr = &options->num_host_cert_files; | ||
824 | if (*intptr >= MAX_HOSTKEYS) | ||
825 | fatal("%s line %d: too many host certificates " | ||
826 | "specified (max %d).", filename, linenum, | ||
827 | MAX_HOSTCERTS); | ||
828 | charptr = &options->host_cert_files[*intptr]; | ||
829 | goto parse_filename; | ||
830 | break; | ||
831 | |||
819 | case sPidFile: | 832 | case sPidFile: |
820 | charptr = &options->pid_file; | 833 | charptr = &options->pid_file; |
821 | goto parse_filename; | 834 | goto parse_filename; |
@@ -1651,6 +1664,8 @@ dump_config(ServerOptions *o) | |||
1651 | /* string array arguments */ | 1664 | /* string array arguments */ |
1652 | dump_cfg_strarray(sHostKeyFile, o->num_host_key_files, | 1665 | dump_cfg_strarray(sHostKeyFile, o->num_host_key_files, |
1653 | o->host_key_files); | 1666 | o->host_key_files); |
1667 | dump_cfg_strarray(sHostKeyFile, o->num_host_cert_files, | ||
1668 | o->host_cert_files); | ||
1654 | dump_cfg_strarray(sAllowUsers, o->num_allow_users, o->allow_users); | 1669 | dump_cfg_strarray(sAllowUsers, o->num_allow_users, o->allow_users); |
1655 | dump_cfg_strarray(sDenyUsers, o->num_deny_users, o->deny_users); | 1670 | dump_cfg_strarray(sDenyUsers, o->num_deny_users, o->deny_users); |
1656 | dump_cfg_strarray(sAllowGroups, o->num_allow_groups, o->allow_groups); | 1671 | dump_cfg_strarray(sAllowGroups, o->num_allow_groups, o->allow_groups); |