diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-27 08:42:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-27 08:42:39 +0000 |
commit | 74f0fc5311d2d8dfa2c559215e2b099a34923469 (patch) | |
tree | dc9858b8784b61022d2bdae82116ab44087666c5 /sshbuf-getput-crypto.c | |
parent | Adding upstream version 1:9.8p1. (diff) | |
download | openssh-74f0fc5311d2d8dfa2c559215e2b099a34923469.tar.xz openssh-74f0fc5311d2d8dfa2c559215e2b099a34923469.zip |
Adding upstream version 1:9.9p1.upstream/1%9.9p1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sshbuf-getput-crypto.c')
-rw-r--r-- | sshbuf-getput-crypto.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sshbuf-getput-crypto.c b/sshbuf-getput-crypto.c index af3f397..e7bffe2 100644 --- a/sshbuf-getput-crypto.c +++ b/sshbuf-getput-crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshbuf-getput-crypto.c,v 1.11 2024/02/01 02:37:33 djm Exp $ */ +/* $OpenBSD: sshbuf-getput-crypto.c,v 1.12 2024/08/15 00:51:51 djm Exp $ */ /* * Copyright (c) 2011 Damien Miller * @@ -176,5 +176,15 @@ sshbuf_put_eckey(struct sshbuf *buf, const EC_KEY *v) return sshbuf_put_ec(buf, EC_KEY_get0_public_key(v), EC_KEY_get0_group(v)); } + +int +sshbuf_put_ec_pkey(struct sshbuf *buf, EVP_PKEY *pkey) +{ + const EC_KEY *ec; + + if ((ec = EVP_PKEY_get0_EC_KEY(pkey)) == NULL) + return SSH_ERR_LIBCRYPTO_ERROR; + return sshbuf_put_eckey(buf, ec); +} #endif /* OPENSSL_HAS_ECC */ #endif /* WITH_OPENSSL */ |