summaryrefslogtreecommitdiffstats
path: root/sshkey.h
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2022-10-28 02:41:52 +0200
committerDamien Miller <djm@mindrot.org>2022-10-28 03:46:59 +0200
commita1deb6cdbbe6afaab74ecb08fcb62db5739267be (patch)
treec5fcd10bde2ab9bdc6cc00da41f5e495bf865021 /sshkey.h
parentupstream: refactor sshkey_from_private() (diff)
downloadopenssh-a1deb6cdbbe6afaab74ecb08fcb62db5739267be.tar.xz
openssh-a1deb6cdbbe6afaab74ecb08fcb62db5739267be.zip
upstream: refactor sshkey_from_blob_internal()
feedback/ok markus@ OpenBSD-Commit-ID: 1f46c0cbb8060ee9666a02749594ad6658c8e283
Diffstat (limited to 'sshkey.h')
-rw-r--r--sshkey.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/sshkey.h b/sshkey.h
index abf92149e..5d9e9df3a 100644
--- a/sshkey.h
+++ b/sshkey.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.h,v 1.57 2022/10/28 00:41:17 djm Exp $ */
+/* $OpenBSD: sshkey.h,v 1.58 2022/10/28 00:41:52 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -170,7 +170,9 @@ struct sshkey_impl_funcs {
void (*cleanup)(struct sshkey *); /* optional */
int (*equal)(const struct sshkey *, const struct sshkey *);
int (*serialize_public)(const struct sshkey *, struct sshbuf *,
- const char *, enum sshkey_serialize_rep);
+ enum sshkey_serialize_rep);
+ int (*deserialize_public)(const char *, struct sshbuf *,
+ struct sshkey *);
int (*generate)(struct sshkey *, int); /* optional */
int (*copy_public)(const struct sshkey *, struct sshkey *);
};
@@ -315,6 +317,10 @@ int sshkey_sk_fields_equal(const struct sshkey *a, const struct sshkey *b);
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);
+#ifdef WITH_OPENSSL
+int check_rsa_length(const RSA *rsa); /* XXX remove */
+#endif
int ssh_rsa_sign(const struct sshkey *key,
u_char **sigp, size_t *lenp, const u_char *data, size_t datalen,