diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2018-09-14 04:17:45 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2018-09-14 04:17:45 +0000 |
commit | f95ad2f4e66b42321f493f4e2f8d47f083c72064 (patch) | |
tree | ef6f240eea56111aa785e2a5f77b93a6aa5cfafb /usr.bin/ssh/sshkey.c | |
parent | 81e1595e531371439a75ac0b52e8132e082f6aa3 (diff) |
garbage-collect moribund ssh_new_private() API.
Diffstat (limited to 'usr.bin/ssh/sshkey.c')
-rw-r--r-- | usr.bin/ssh/sshkey.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/usr.bin/ssh/sshkey.c b/usr.bin/ssh/sshkey.c index 0814c11a277..f7c09fbe100 100644 --- a/usr.bin/ssh/sshkey.c +++ b/usr.bin/ssh/sshkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshkey.c,v 1.69 2018/09/13 02:08:33 djm Exp $ */ +/* $OpenBSD: sshkey.c,v 1.70 2018/09/14 04:17:44 djm Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * Copyright (c) 2008 Alexander von Gernler. All rights reserved. @@ -527,17 +527,6 @@ sshkey_new(int type) return k; } -/* XXX garbage-collect this API */ -struct sshkey * -sshkey_new_private(int type) -{ - struct sshkey *k = sshkey_new(type); - - if (k == NULL) - return NULL; - return k; -} - void sshkey_free(struct sshkey *k) { @@ -2890,7 +2879,7 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp) switch (type) { #ifdef WITH_OPENSSL case KEY_DSA: - if ((k = sshkey_new_private(type)) == NULL) { + if ((k = sshkey_new(type)) == NULL) { r = SSH_ERR_ALLOC_FAIL; goto out; } @@ -2934,7 +2923,7 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp) dsa_priv_key = NULL; /* transferred */ break; case KEY_ECDSA: - if ((k = sshkey_new_private(type)) == NULL) { + if ((k = sshkey_new(type)) == NULL) { r = SSH_ERR_ALLOC_FAIL; goto out; } @@ -2983,7 +2972,7 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp) goto out; break; case KEY_RSA: - if ((k = sshkey_new_private(type)) == NULL) { + if ((k = sshkey_new(type)) == NULL) { r = SSH_ERR_ALLOC_FAIL; goto out; } @@ -3049,7 +3038,7 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp) break; #endif /* WITH_OPENSSL */ case KEY_ED25519: - if ((k = sshkey_new_private(type)) == NULL) { + if ((k = sshkey_new(type)) == NULL) { r = SSH_ERR_ALLOC_FAIL; goto out; } @@ -3079,7 +3068,7 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp) break; #ifdef WITH_XMSS case KEY_XMSS: - if ((k = sshkey_new_private(type)) == NULL) { + if ((k = sshkey_new(type)) == NULL) { r = SSH_ERR_ALLOC_FAIL; goto out; } |