summaryrefslogtreecommitdiff
path: root/sshkey.h
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2022-10-28 00:44:17 +0000
committerDamien Miller <djm@mindrot.org>2022-10-28 12:47:01 +1100
commit2519a7077a9332f70935e5242ba91ee670ed6b87 (patch)
tree2807e57cf1a61c8e7f8c26e273fad586c798ee2d /sshkey.h
parent11a768adf98371fe4e43f3b06014024c033385d5 (diff)
downloadopenssh-git-2519a7077a9332f70935e5242ba91ee670ed6b87.tar.gz
upstream: refactor sshkey_private_serialize_opt()
feedback/ok markus@ OpenBSD-Commit-ID: 61e0fe989897901294efe7c3b6d670cefaf44cbd
Diffstat (limited to 'sshkey.h')
-rw-r--r--sshkey.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sshkey.h b/sshkey.h
index d740c20b..9ee9d6c5 100644
--- a/sshkey.h
+++ b/sshkey.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.h,v 1.59 2022/10/28 00:43:08 djm Exp $ */
+/* $OpenBSD: sshkey.h,v 1.60 2022/10/28 00:44:17 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -173,6 +173,8 @@ struct sshkey_impl_funcs {
enum sshkey_serialize_rep);
int (*deserialize_public)(const char *, struct sshbuf *,
struct sshkey *);
+ int (*serialize_private)(const struct sshkey *, struct sshbuf *,
+ enum sshkey_serialize_rep);
int (*generate)(struct sshkey *, int); /* optional */
int (*copy_public)(const struct sshkey *, struct sshkey *);
int (*sign)(struct sshkey *, u_char **, size_t *,
@@ -324,6 +326,8 @@ void sshkey_sk_cleanup(struct sshkey *k);
int sshkey_serialize_sk(const struct sshkey *key, struct sshbuf *b);
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);
#ifdef WITH_OPENSSL
int check_rsa_length(const RSA *rsa); /* XXX remove */
#endif