|
Line
Link Here
|
| 0 |
-- a/authfile.c |
0 |
++ b/authfile.c |
|
Lines 270-282
sshkey_load_public(const char *filename, struct sshkey **keyp, char **commentp)
Link Here
|
| 270 |
if (commentp != NULL) |
270 |
if (commentp != NULL) |
| 271 |
*commentp = NULL; |
271 |
*commentp = NULL; |
| 272 |
|
272 |
|
| 273 |
if ((r = sshkey_try_load_public(keyp, filename, commentp)) == 0) |
273 |
if ((r = sshkey_try_load_public(keyp, filename, commentp)) > 0) |
| 274 |
goto out; |
274 |
goto out; |
| 275 |
|
275 |
|
| 276 |
/* try .pub suffix */ |
276 |
/* try .pub suffix */ |
| 277 |
if (asprintf(&pubfile, "%s.pub", filename) == -1) |
277 |
if (asprintf(&pubfile, "%s.pub", filename) == -1) |
| 278 |
return SSH_ERR_ALLOC_FAIL; |
278 |
return SSH_ERR_ALLOC_FAIL; |
| 279 |
if ((r = sshkey_try_load_public(keyp, pubfile, commentp)) == 0) |
279 |
if ((r = sshkey_try_load_public(keyp, pubfile, commentp)) > 0) |
| 280 |
goto out; |
280 |
goto out; |
| 281 |
|
281 |
|
| 282 |
/* finally, try to extract public key from private key file */ |
282 |
/* finally, try to extract public key from private key file */ |