[openssh-commits] [openssh] 02/02: upstream: garbage-collect moribund ssh_new_private() API.
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Sep 14 14:19:18 AEST 2018
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 6da046f9c3374ce7e269ded15d8ff8bc45017301
Author: djm at openbsd.org <djm at openbsd.org>
Date: Fri Sep 14 04:17:44 2018 +0000
upstream: garbage-collect moribund ssh_new_private() API.
OpenBSD-Commit-ID: 7c05bf13b094093dfa01848a9306c82eb6e95f6c
---
ssh-keygen.c | 6 +++---
sshkey.c | 23 ++++++-----------------
sshkey.h | 3 +--
3 files changed, 10 insertions(+), 22 deletions(-)
diff --git a/ssh-keygen.c b/ssh-keygen.c
index a70fd1f8..46b3af5a 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.320 2018/09/12 01:21:34 djm Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.322 2018/09/14 04:17:44 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -491,8 +491,8 @@ do_convert_private_ssh2_from_blob(u_char *blob, u_int blen)
free(type);
return NULL;
}
- if ((key = sshkey_new_private(ktype)) == NULL)
- fatal("sshkey_new_private failed");
+ if ((key = sshkey_new(ktype)) == NULL)
+ fatal("sshkey_new failed");
free(type);
switch (key->type) {
diff --git a/sshkey.c b/sshkey.c
index 6f2c9d44..4bd975ce 100644
--- a/sshkey.c
+++ b/sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.c,v 1.68 2018/09/12 01:32:54 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.
@@ -557,17 +557,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)
{
@@ -2952,7 +2941,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;
}
@@ -2997,7 +2986,7 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
break;
# ifdef OPENSSL_HAS_ECC
case KEY_ECDSA:
- if ((k = sshkey_new_private(type)) == NULL) {
+ if ((k = sshkey_new(type)) == NULL) {
r = SSH_ERR_ALLOC_FAIL;
goto out;
}
@@ -3047,7 +3036,7 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
break;
# endif /* OPENSSL_HAS_ECC */
case KEY_RSA:
- if ((k = sshkey_new_private(type)) == NULL) {
+ if ((k = sshkey_new(type)) == NULL) {
r = SSH_ERR_ALLOC_FAIL;
goto out;
}
@@ -3113,7 +3102,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;
}
@@ -3143,7 +3132,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;
}
diff --git a/sshkey.h b/sshkey.h
index 4147ad92..f6a007fd 100644
--- a/sshkey.h
+++ b/sshkey.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.h,v 1.28 2018/09/12 01:32:54 djm Exp $ */
+/* $OpenBSD: sshkey.h,v 1.30 2018/09/14 04:17:44 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -128,7 +128,6 @@ struct sshkey {
#define ED25519_PK_SZ crypto_sign_ed25519_PUBLICKEYBYTES
struct sshkey *sshkey_new(int);
-struct sshkey *sshkey_new_private(int); /* XXX garbage collect */
void sshkey_free(struct sshkey *);
int sshkey_equal_public(const struct sshkey *,
const struct sshkey *);
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list