diff options
author | djm@openbsd.org <djm@openbsd.org> | 2022-10-28 02:41:17 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2022-10-28 03:46:59 +0200 |
commit | 7d00799c935271ce89300494c5677190779f6453 (patch) | |
tree | 14b674e5ef56ed3f05af8b38c446b8f1cf5c2f39 /sshkey.h | |
parent | upstream: factor out key generation (diff) | |
download | openssh-7d00799c935271ce89300494c5677190779f6453.tar.xz openssh-7d00799c935271ce89300494c5677190779f6453.zip |
upstream: refactor sshkey_from_private()
feedback/ok markus@
OpenBSD-Commit-ID: e5dbe7a3545930c50f70ee75c867a1e08b382b53
Diffstat (limited to 'sshkey.h')
-rw-r--r-- | sshkey.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: sshkey.h,v 1.56 2022/10/28 00:39:29 djm Exp $ */ +/* $OpenBSD: sshkey.h,v 1.57 2022/10/28 00:41:17 djm Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -172,6 +172,7 @@ struct sshkey_impl_funcs { int (*serialize_public)(const struct sshkey *, struct sshbuf *, const char *, enum sshkey_serialize_rep); int (*generate)(struct sshkey *, int); /* optional */ + int (*copy_public)(const struct sshkey *, struct sshkey *); }; struct sshkey_impl { @@ -313,6 +314,7 @@ void sshkey_sig_details_free(struct sshkey_sig_details *); 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 ssh_rsa_sign(const struct sshkey *key, u_char **sigp, size_t *lenp, const u_char *data, size_t datalen, |