=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-ecdsa-sk.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- src/usr.bin/ssh/ssh-ecdsa-sk.c 2022/10/28 00:39:29 1.12 +++ src/usr.bin/ssh/ssh-ecdsa-sk.c 2022/10/28 00:41:17 1.13 @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-ecdsa-sk.c,v 1.12 2022/10/28 00:39:29 djm Exp $ */ +/* $OpenBSD: ssh-ecdsa-sk.c,v 1.13 2022/10/28 00:41:17 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2010 Damien Miller. All rights reserved. @@ -78,6 +78,18 @@ return 0; } +static int +ssh_ecdsa_sk_copy_public(const struct sshkey *from, struct sshkey *to) +{ + int r; + + if ((r = sshkey_ecdsa_funcs.copy_public(from, to)) != 0) + return r; + if ((r = sshkey_copy_public_sk(from, to)) != 0) + return r; + return 0; +} + /* * Check FIDO/W3C webauthn signatures clientData field against the expected * format and prepare a hash of it for use in signature verification. @@ -345,6 +357,7 @@ /* .equal = */ ssh_ecdsa_sk_equal, /* .ssh_serialize_public = */ ssh_ecdsa_sk_serialize_public, /* .generate = */ NULL, + /* .copy_public = */ ssh_ecdsa_sk_copy_public, }; const struct sshkey_impl sshkey_ecdsa_sk_impl = {