version 1.13, 2022/10/28 00:41:17 |
version 1.14, 2022/10/28 00:41:52 |
|
|
|
|
static int |
static int |
ssh_ecdsa_sk_serialize_public(const struct sshkey *key, struct sshbuf *b, |
ssh_ecdsa_sk_serialize_public(const struct sshkey *key, struct sshbuf *b, |
const char *typename, enum sshkey_serialize_rep opts) |
enum sshkey_serialize_rep opts) |
{ |
{ |
int r; |
int r; |
|
|
if ((r = sshkey_ecdsa_funcs.serialize_public(key, b, |
if ((r = sshkey_ecdsa_funcs.serialize_public(key, b, opts)) != 0) |
typename, opts)) != 0) |
|
return r; |
return r; |
if ((r = sshkey_serialize_sk(key, b)) != 0) |
if ((r = sshkey_serialize_sk(key, b)) != 0) |
return r; |
return r; |
|
|
return 0; |
return 0; |
} |
} |
|
|
|
static int |
|
ssh_ecdsa_sk_deserialize_public(const char *ktype, struct sshbuf *b, |
|
struct sshkey *key) |
|
{ |
|
int r; |
|
|
|
if ((r = sshkey_ecdsa_funcs.deserialize_public(ktype, b, key)) != 0) |
|
return r; |
|
if ((r = sshkey_deserialize_sk(b, key)) != 0) |
|
return r; |
|
return 0; |
|
} |
|
|
/* |
/* |
* Check FIDO/W3C webauthn signatures clientData field against the expected |
* Check FIDO/W3C webauthn signatures clientData field against the expected |
* format and prepare a hash of it for use in signature verification. |
* format and prepare a hash of it for use in signature verification. |
|
|
/* .cleanup = */ ssh_ecdsa_sk_cleanup, |
/* .cleanup = */ ssh_ecdsa_sk_cleanup, |
/* .equal = */ ssh_ecdsa_sk_equal, |
/* .equal = */ ssh_ecdsa_sk_equal, |
/* .ssh_serialize_public = */ ssh_ecdsa_sk_serialize_public, |
/* .ssh_serialize_public = */ ssh_ecdsa_sk_serialize_public, |
|
/* .ssh_deserialize_public = */ ssh_ecdsa_sk_deserialize_public, |
/* .generate = */ NULL, |
/* .generate = */ NULL, |
/* .copy_public = */ ssh_ecdsa_sk_copy_public, |
/* .copy_public = */ ssh_ecdsa_sk_copy_public, |
}; |
}; |