version 1.193, 2010/06/29 23:15:30 |
version 1.196, 2010/08/04 05:40:39 |
|
|
do_convert_from(struct passwd *pw) |
do_convert_from(struct passwd *pw) |
{ |
{ |
Key *k = NULL; |
Key *k = NULL; |
int private = 0, ok; |
int private = 0, ok = 0; |
struct stat st; |
struct stat st; |
|
|
if (!have_identity) |
if (!have_identity) |
|
|
prepare_options_buf(Buffer *c, int which) |
prepare_options_buf(Buffer *c, int which) |
{ |
{ |
buffer_clear(c); |
buffer_clear(c); |
|
if ((which & OPTIONS_CRITICAL) != 0 && |
|
certflags_command != NULL) |
|
add_string_option(c, "force-command", certflags_command); |
if ((which & OPTIONS_EXTENSIONS) != 0 && |
if ((which & OPTIONS_EXTENSIONS) != 0 && |
(certflags_flags & CERTOPT_X_FWD) != 0) |
|
add_flag_option(c, "permit-X11-forwarding"); |
|
if ((which & OPTIONS_EXTENSIONS) != 0 && |
|
(certflags_flags & CERTOPT_AGENT_FWD) != 0) |
(certflags_flags & CERTOPT_AGENT_FWD) != 0) |
add_flag_option(c, "permit-agent-forwarding"); |
add_flag_option(c, "permit-agent-forwarding"); |
if ((which & OPTIONS_EXTENSIONS) != 0 && |
if ((which & OPTIONS_EXTENSIONS) != 0 && |
|
|
if ((which & OPTIONS_EXTENSIONS) != 0 && |
if ((which & OPTIONS_EXTENSIONS) != 0 && |
(certflags_flags & CERTOPT_USER_RC) != 0) |
(certflags_flags & CERTOPT_USER_RC) != 0) |
add_flag_option(c, "permit-user-rc"); |
add_flag_option(c, "permit-user-rc"); |
|
if ((which & OPTIONS_EXTENSIONS) != 0 && |
|
(certflags_flags & CERTOPT_X_FWD) != 0) |
|
add_flag_option(c, "permit-X11-forwarding"); |
if ((which & OPTIONS_CRITICAL) != 0 && |
if ((which & OPTIONS_CRITICAL) != 0 && |
certflags_command != NULL) |
|
add_string_option(c, "force-command", certflags_command); |
|
if ((which & OPTIONS_CRITICAL) != 0 && |
|
certflags_src_addr != NULL) |
certflags_src_addr != NULL) |
add_string_option(c, "source-address", certflags_src_addr); |
add_string_option(c, "source-address", certflags_src_addr); |
} |
} |
|
|
fprintf(stderr, " -i Import foreign format to OpenSSH key file.\n"); |
fprintf(stderr, " -i Import foreign format to OpenSSH key file.\n"); |
fprintf(stderr, " -L Print the contents of a certificate.\n"); |
fprintf(stderr, " -L Print the contents of a certificate.\n"); |
fprintf(stderr, " -l Show fingerprint of key file.\n"); |
fprintf(stderr, " -l Show fingerprint of key file.\n"); |
fprintf(stderr, " -m key_fmt Conversion format for -e/-i (PEM|PKCS8|RFC4716).\n"); |
|
fprintf(stderr, " -M memory Amount of memory (MB) to use for generating DH-GEX moduli.\n"); |
fprintf(stderr, " -M memory Amount of memory (MB) to use for generating DH-GEX moduli.\n"); |
fprintf(stderr, " -n name,... User/host principal names to include in certificate\n"); |
fprintf(stderr, " -m key_fmt Conversion format for -e/-i (PEM|PKCS8|RFC4716).\n"); |
fprintf(stderr, " -N phrase Provide new passphrase.\n"); |
fprintf(stderr, " -N phrase Provide new passphrase.\n"); |
|
fprintf(stderr, " -n name,... User/host principal names to include in certificate\n"); |
fprintf(stderr, " -O option Specify a certificate option.\n"); |
fprintf(stderr, " -O option Specify a certificate option.\n"); |
fprintf(stderr, " -P phrase Provide old passphrase.\n"); |
fprintf(stderr, " -P phrase Provide old passphrase.\n"); |
fprintf(stderr, " -p Change passphrase of private key file.\n"); |
fprintf(stderr, " -p Change passphrase of private key file.\n"); |
fprintf(stderr, " -q Quiet.\n"); |
fprintf(stderr, " -q Quiet.\n"); |
fprintf(stderr, " -R hostname Remove host from known_hosts file.\n"); |
fprintf(stderr, " -R hostname Remove host from known_hosts file.\n"); |
fprintf(stderr, " -r hostname Print DNS resource record.\n"); |
fprintf(stderr, " -r hostname Print DNS resource record.\n"); |
fprintf(stderr, " -s ca_key Certify keys with CA key.\n"); |
|
fprintf(stderr, " -S start Start point (hex) for generating DH-GEX moduli.\n"); |
fprintf(stderr, " -S start Start point (hex) for generating DH-GEX moduli.\n"); |
|
fprintf(stderr, " -s ca_key Certify keys with CA key.\n"); |
fprintf(stderr, " -T file Screen candidates for DH-GEX moduli.\n"); |
fprintf(stderr, " -T file Screen candidates for DH-GEX moduli.\n"); |
fprintf(stderr, " -t type Specify type of key to create.\n"); |
fprintf(stderr, " -t type Specify type of key to create.\n"); |
fprintf(stderr, " -V from:to Specify certificate validity interval.\n"); |
fprintf(stderr, " -V from:to Specify certificate validity interval.\n"); |