diff options
author | djm@openbsd.org <djm@openbsd.org> | 2014-12-04 20:47:36 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2014-12-05 09:29:48 +1100 |
commit | a7c762e5b2c1093542c0bc1df25ccec0b4cf479f (patch) | |
tree | a718cf5e40cf543b8369c0fbdfc478de5e8a0d50 | |
parent | 5e39a49930d885aac9c76af3129332b6e772cd75 (diff) |
upstream commit
key_in_file() wrapper is no longer used
-rw-r--r-- | key.c | 16 | ||||
-rw-r--r-- | key.h | 3 |
2 files changed, 2 insertions, 17 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: key.c,v 1.122 2014/07/22 01:18:50 dtucker Exp $ */ | 1 | /* $OpenBSD: key.c,v 1.123 2014/12/04 20:47:36 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * placed in the public domain | 3 | * placed in the public domain |
4 | */ | 4 | */ |
@@ -463,17 +463,3 @@ key_perm_ok(int fd, const char *filename) | |||
463 | return sshkey_perm_ok(fd, filename) == 0 ? 1 : 0; | 463 | return sshkey_perm_ok(fd, filename) == 0 ? 1 : 0; |
464 | } | 464 | } |
465 | 465 | ||
466 | int | ||
467 | key_in_file(Key *key, const char *filename, int strict_type) | ||
468 | { | ||
469 | int r; | ||
470 | |||
471 | if ((r = sshkey_in_file(key, filename, strict_type)) != 0) { | ||
472 | fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR); | ||
473 | if (r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT) | ||
474 | return 0; | ||
475 | error("%s: %s", __func__, ssh_err(r)); | ||
476 | return r == SSH_ERR_KEY_NOT_FOUND ? 0 : -1; | ||
477 | } | ||
478 | return 1; | ||
479 | } | ||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: key.h,v 1.42 2014/06/24 01:13:21 djm Exp $ */ | 1 | /* $OpenBSD: key.h,v 1.43 2014/12/04 20:47:36 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. |
@@ -106,6 +106,5 @@ Key *key_load_private_cert(int, const char *, const char *, int *); | |||
106 | Key *key_load_private_type(int, const char *, const char *, char **, int *); | 106 | Key *key_load_private_type(int, const char *, const char *, char **, int *); |
107 | Key *key_load_private_pem(int, int, const char *, char **); | 107 | Key *key_load_private_pem(int, int, const char *, char **); |
108 | int key_perm_ok(int, const char *); | 108 | int key_perm_ok(int, const char *); |
109 | int key_in_file(Key *, const char *, int); | ||
110 | 109 | ||
111 | #endif | 110 | #endif |