|
Lines 3860-3865
int
Link Here
|
| 3860 |
sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type, |
3860 |
sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type, |
| 3861 |
const char *passphrase, struct sshkey **keyp, char **commentp) |
3861 |
const char *passphrase, struct sshkey **keyp, char **commentp) |
| 3862 |
{ |
3862 |
{ |
|
|
3863 |
int r = SSH_ERR_INTERNAL_ERROR; |
| 3863 |
if (keyp != NULL) |
3864 |
if (keyp != NULL) |
| 3864 |
*keyp = NULL; |
3865 |
*keyp = NULL; |
| 3865 |
if (commentp != NULL) |
3866 |
if (commentp != NULL) |
|
Lines 3882-3890
sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type,
Link Here
|
| 3882 |
return sshkey_parse_private2(blob, type, passphrase, |
3883 |
return sshkey_parse_private2(blob, type, passphrase, |
| 3883 |
keyp, commentp); |
3884 |
keyp, commentp); |
| 3884 |
case KEY_UNSPEC: |
3885 |
case KEY_UNSPEC: |
| 3885 |
if (sshkey_parse_private2(blob, type, passphrase, keyp, |
3886 |
r = sshkey_parse_private2(blob, type, passphrase, keyp, |
| 3886 |
commentp) == 0) |
3887 |
commentp); |
| 3887 |
return 0; |
3888 |
/* Do not fallback to PEM parser, if only passphrase is wrong */ |
|
|
3889 |
if (r == 0 || r == SSH_ERR_KEY_WRONG_PASSPHRASE) |
| 3890 |
return r; |
| 3888 |
#ifdef WITH_OPENSSL |
3891 |
#ifdef WITH_OPENSSL |
| 3889 |
return sshkey_parse_private_pem_fileblob(blob, type, |
3892 |
return sshkey_parse_private_pem_fileblob(blob, type, |
| 3890 |
passphrase, keyp); |
3893 |
passphrase, keyp); |