version 1.14, 2022/10/28 00:39:29 |
version 1.15, 2022/10/28 00:41:17 |
|
|
return 0; |
return 0; |
} |
} |
|
|
|
static int |
|
ssh_ed25519_copy_public(const struct sshkey *from, struct sshkey *to) |
|
{ |
|
if (from->ed25519_pk == NULL) |
|
return 0; /* XXX SSH_ERR_INTERNAL_ERROR ? */ |
|
if ((to->ed25519_pk = malloc(ED25519_PK_SZ)) == NULL) |
|
return SSH_ERR_ALLOC_FAIL; |
|
memcpy(to->ed25519_pk, from->ed25519_pk, ED25519_PK_SZ); |
|
return 0; |
|
} |
|
|
int |
int |
ssh_ed25519_sign(const struct sshkey *key, u_char **sigp, size_t *lenp, |
ssh_ed25519_sign(const struct sshkey *key, u_char **sigp, size_t *lenp, |
const u_char *data, size_t datalen, u_int compat) |
const u_char *data, size_t datalen, u_int compat) |
|
|
/* .equal = */ ssh_ed25519_equal, |
/* .equal = */ ssh_ed25519_equal, |
/* .ssh_serialize_public = */ ssh_ed25519_serialize_public, |
/* .ssh_serialize_public = */ ssh_ed25519_serialize_public, |
/* .generate = */ ssh_ed25519_generate, |
/* .generate = */ ssh_ed25519_generate, |
|
/* .copy_public = */ ssh_ed25519_copy_public, |
}; |
}; |
|
|
const struct sshkey_impl sshkey_ed25519_impl = { |
const struct sshkey_impl sshkey_ed25519_impl = { |