search for: do_convert_from_subjectinfo

Displaying 1 result from an estimated 1 matches for "do_convert_from_subjectinfo".

2012 Jul 28
1
[PATCH] ssh-keygen: support public key import/export using SubjectPublicKeyInfo
...swd *pw) case FMT_PEM: do_convert_to_pem(k); break; + case FMT_SUBJECTINFO: + do_convert_to_subjectinfo(k); + break; default: fatal("%s: unknown key format %d", __func__, convert_format); } @@ -631,6 +656,38 @@ do_convert_from_pem(Key **k, int *private) } static void +do_convert_from_subjectinfo(Key **k, int *private) +{ + FILE *fp; + RSA *rsa; +#ifdef notyet + DSA *dsa; +#endif + + if ((fp = fopen(identity_file, "r")) == NULL) + fatal("%s: %s: %s", __progname, identity_file, strerror(errno)); + if ((rsa = PEM_read_RSA_PUBKEY(fp, NULL, NULL, NULL)) != NULL) { + *k = k...