version 1.25.2.4, 2001/03/12 15:44:16 |
version 1.40, 2001/01/19 15:55:11 |
|
|
|
|
#include <openssl/evp.h> |
#include <openssl/evp.h> |
#include <openssl/pem.h> |
#include <openssl/pem.h> |
|
#include <openssl/rsa.h> |
|
#include <openssl/dsa.h> |
|
|
|
#include "ssh.h" |
#include "xmalloc.h" |
#include "xmalloc.h" |
#include "key.h" |
#include "key.h" |
|
#include "rsa.h" |
#include "authfile.h" |
#include "authfile.h" |
#include "uuencode.h" |
#include "uuencode.h" |
|
|
#include "buffer.h" |
#include "buffer.h" |
#include "bufaux.h" |
#include "bufaux.h" |
#include "pathnames.h" |
#include "pathnames.h" |
#include "log.h" |
|
#include "readpass.h" |
|
|
|
/* Number of bits in the RSA/DSA key. This value can be changed on the command line. */ |
/* Number of bits in the RSA/DSA key. This value can be changed on the command line. */ |
int bits = 1024; |
int bits = 1024; |
|
|
#define SSH_COM_PUBLIC_BEGIN "---- BEGIN SSH2 PUBLIC KEY ----" |
#define SSH_COM_PUBLIC_BEGIN "---- BEGIN SSH2 PUBLIC KEY ----" |
#define SSH_COM_PUBLIC_END "---- END SSH2 PUBLIC KEY ----" |
#define SSH_COM_PUBLIC_END "---- END SSH2 PUBLIC KEY ----" |
#define SSH_COM_PRIVATE_BEGIN "---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----" |
#define SSH_COM_PRIVATE_BEGIN "---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----" |
#define SSH_COM_PRIVATE_KEY_MAGIC 0x3f6ff9eb |
#define SSH_COM_PRIVATE_KEY_MAGIC 0x3f6ff9eb |
|
|
void |
void |
do_convert_to_ssh2(struct passwd *pw) |
do_convert_to_ssh2(struct passwd *pw) |
|
|
public = key_new(KEY_RSA1); |
public = key_new(KEY_RSA1); |
if (!load_public_key(identity_file, public, NULL)) { |
if (!load_public_key(identity_file, public, NULL)) { |
printf("%s is not a valid key file.\n", identity_file); |
printf("%s is not a valid key file.\n", identity_file); |
printf("Comments are only supported in RSA1 keys\n"); |
|
exit(1); |
exit(1); |
} |
} |
|
|