summaryrefslogtreecommitdiffstats
path: root/sshkey.h
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2022-10-28 02:44:44 +0200
committerDamien Miller <djm@mindrot.org>2022-10-28 03:47:01 +0200
commit27267642699342412964aa785b98afd69d952c88 (patch)
treeb2aa59e6b542da8a1ece82e337cf38e4c253067b /sshkey.h
parentupstream: refactor sshkey_private_serialize_opt() (diff)
downloadopenssh-27267642699342412964aa785b98afd69d952c88.tar.xz
openssh-27267642699342412964aa785b98afd69d952c88.zip
upstream: refactor sshkey_private_deserialize
feedback/ok markus@ OpenBSD-Commit-ID: f5ca6932fdaf840a5e8250becb38315a29b5fc9f
Diffstat (limited to 'sshkey.h')
-rw-r--r--sshkey.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sshkey.h b/sshkey.h
index 9ee9d6c5c..771c4bcee 100644
--- a/sshkey.h
+++ b/sshkey.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.h,v 1.60 2022/10/28 00:44:17 djm Exp $ */
+/* $OpenBSD: sshkey.h,v 1.61 2022/10/28 00:44:44 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -175,6 +175,8 @@ struct sshkey_impl_funcs {
struct sshkey *);
int (*serialize_private)(const struct sshkey *, struct sshbuf *,
enum sshkey_serialize_rep);
+ int (*deserialize_private)(const char *, struct sshbuf *,
+ struct sshkey *);
int (*generate)(struct sshkey *, int); /* optional */
int (*copy_public)(const struct sshkey *, struct sshkey *);
int (*sign)(struct sshkey *, u_char **, size_t *,
@@ -328,6 +330,7 @@ int sshkey_copy_public_sk(const struct sshkey *from, struct sshkey *to);
int sshkey_deserialize_sk(struct sshbuf *b, struct sshkey *key);
int sshkey_serialize_private_sk(const struct sshkey *key,
struct sshbuf *buf);
+int sshkey_private_deserialize_sk(struct sshbuf *buf, struct sshkey *k);
#ifdef WITH_OPENSSL
int check_rsa_length(const RSA *rsa); /* XXX remove */
#endif