summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2014-12-04 20:47:36 +0000
committerDamien Miller <djm@mindrot.org>2014-12-05 09:29:48 +1100
commita7c762e5b2c1093542c0bc1df25ccec0b4cf479f (patch)
treea718cf5e40cf543b8369c0fbdfc478de5e8a0d50
parent5e39a49930d885aac9c76af3129332b6e772cd75 (diff)
upstream commit
key_in_file() wrapper is no longer used
-rw-r--r--key.c16
-rw-r--r--key.h3
2 files changed, 2 insertions, 17 deletions
diff --git a/key.c b/key.c
index 206076159..dd0f448a4 100644
--- a/key.c
+++ b/key.c
@@ -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
466int
467key_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}
diff --git a/key.h b/key.h
index c6401a576..212a169fa 100644
--- a/key.h
+++ b/key.h
@@ -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 *);
106Key *key_load_private_type(int, const char *, const char *, char **, int *); 106Key *key_load_private_type(int, const char *, const char *, char **, int *);
107Key *key_load_private_pem(int, int, const char *, char **); 107Key *key_load_private_pem(int, int, const char *, char **);
108int key_perm_ok(int, const char *); 108int key_perm_ok(int, const char *);
109int key_in_file(Key *, const char *, int);
110 109
111#endif 110#endif