summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 5d9fa644e..9f519e596 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -12,22 +12,20 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: ssh-keygen.c,v 1.39 2001/01/13 18:03:07 markus Exp $"); 15RCSID("$OpenBSD: ssh-keygen.c,v 1.41 2001/01/21 19:05:57 markus Exp $");
16 16
17#include <openssl/evp.h> 17#include <openssl/evp.h>
18#include <openssl/pem.h> 18#include <openssl/pem.h>
19#include <openssl/rsa.h>
20#include <openssl/dsa.h>
21 19
22#include "ssh.h"
23#include "xmalloc.h" 20#include "xmalloc.h"
24#include "key.h" 21#include "key.h"
25#include "rsa.h"
26#include "authfile.h" 22#include "authfile.h"
27#include "uuencode.h" 23#include "uuencode.h"
28
29#include "buffer.h" 24#include "buffer.h"
30#include "bufaux.h" 25#include "bufaux.h"
26#include "pathnames.h"
27#include "log.h"
28#include "readpass.h"
31 29
32/* Number of bits in the RSA/DSA key. This value can be changed on the command line. */ 30/* Number of bits in the RSA/DSA key. This value can be changed on the command line. */
33int bits = 1024; 31int bits = 1024;
@@ -87,13 +85,13 @@ ask_filename(struct passwd *pw, const char *prompt)
87 85
88 switch (key_type_from_name(key_type_name)) { 86 switch (key_type_from_name(key_type_name)) {
89 case KEY_RSA1: 87 case KEY_RSA1:
90 name = SSH_CLIENT_IDENTITY; 88 name = _PATH_SSH_CLIENT_IDENTITY;
91 break; 89 break;
92 case KEY_DSA: 90 case KEY_DSA:
93 name = SSH_CLIENT_ID_DSA; 91 name = _PATH_SSH_CLIENT_ID_DSA;
94 break; 92 break;
95 case KEY_RSA: 93 case KEY_RSA:
96 name = SSH_CLIENT_ID_RSA; 94 name = _PATH_SSH_CLIENT_ID_RSA;
97 break; 95 break;
98 default: 96 default:
99 fprintf(stderr, "bad key type"); 97 fprintf(stderr, "bad key type");
@@ -757,7 +755,7 @@ main(int ac, char **av)
757 ask_filename(pw, "Enter file in which to save the key"); 755 ask_filename(pw, "Enter file in which to save the key");
758 756
759 /* Create ~/.ssh directory if it doesn\'t already exist. */ 757 /* Create ~/.ssh directory if it doesn\'t already exist. */
760 snprintf(dotsshdir, sizeof dotsshdir, "%s/%s", pw->pw_dir, SSH_USER_DIR); 758 snprintf(dotsshdir, sizeof dotsshdir, "%s/%s", pw->pw_dir, _PATH_SSH_USER_DIR);
761 if (strstr(identity_file, dotsshdir) != NULL && 759 if (strstr(identity_file, dotsshdir) != NULL &&
762 stat(dotsshdir, &st) < 0) { 760 stat(dotsshdir, &st) < 0) {
763 if (mkdir(dotsshdir, 0700) < 0) 761 if (mkdir(dotsshdir, 0700) < 0)