/freebsd/crypto/openssh/ |
H A D | sshkey.h | 122 struct sshkey *signature_key; 127 struct sshkey { struct 169 u_int (*size)(const struct sshkey *); /* optional */ argument 170 int (*alloc)(struct sshkey *); /* optional */ 171 void (*cleanup)(struct sshkey *); /* optional */ 172 int (*equal)(const struct sshkey *, const struct sshkey *); 173 int (*serialize_public)(const struct sshkey *, struct sshbuf *, 176 struct sshkey *); 177 int (*serialize_private)(const struct sshkey *, struct sshbuf *, 180 struct sshkey *); [all …]
|
H A D | sshkey-xmss.h | 33 size_t sshkey_xmss_pklen(const struct sshkey *); 34 size_t sshkey_xmss_sklen(const struct sshkey *); 35 int sshkey_xmss_init(struct sshkey *, const char *); 36 void sshkey_xmss_free_state(struct sshkey *); 37 int sshkey_xmss_generate_private_key(struct sshkey *, int); 38 int sshkey_xmss_serialize_state(const struct sshkey *, struct sshbuf *); 39 int sshkey_xmss_serialize_state_opt(const struct sshkey *, struct sshbuf *, 41 int sshkey_xmss_serialize_pk_info(const struct sshkey *, struct sshbuf *, 43 int sshkey_xmss_deserialize_state(struct sshkey *, struct sshbuf *); 44 int sshkey_xmss_deserialize_state_opt(struct sshkey *, struct sshbuf *); [all …]
|
H A D | authfile.h | 31 struct sshkey; 36 int sshkey_save_private(struct sshkey *, const char *, 38 int sshkey_load_cert(const char *, struct sshkey **); 39 int sshkey_load_public(const char *, struct sshkey **, char **); 40 int sshkey_load_private(const char *, const char *, struct sshkey **, char **); 42 struct sshkey **); 44 struct sshkey **, char **); 46 struct sshkey **keyp, char **commentp); 48 int sshkey_in_file(struct sshkey *, const char *, int, int); 49 int sshkey_check_revoked(struct sshkey *key, const char *revoked_keys_file); [all …]
|
H A D | auth.h | 47 struct sshkey; 89 struct sshkey **prev_keys; 93 struct sshkey *auth_method_key; 141 const char *, char *, struct sshkey *); 142 int user_key_allowed(struct ssh *ssh, struct passwd *, struct sshkey *, 144 int auth2_key_already_used(Authctxt *, const struct sshkey *); 151 void auth2_record_key(Authctxt *, int, const struct sshkey *); 198 int auth_key_is_revoked(struct sshkey *); 203 check_key_in_hostfiles(struct passwd *, struct sshkey *, const char *, 207 struct sshkey *get_hostkey_by_index(int); [all …]
|
H A D | sshsig.h | 22 struct sshkey; 26 typedef int sshsig_signer(struct sshkey *, u_char **, size_t *, 37 int sshsig_signb(struct sshkey *key, const char *hashalg, 49 struct sshkey **sign_keyp, struct sshkey_sig_details **sig_details); 58 int sshsig_sign_fd(struct sshkey *key, const char *hashalg, 69 const char *sig_namespace, struct sshkey **sign_keyp, 88 int sshsig_check_allowed_keys(const char *path, const struct sshkey *sign_key, 99 int sshsig_get_pubkey(struct sshbuf *signature, struct sshkey **pubkey); 104 int sshsig_find_principals(const char *path, const struct sshkey *sign_key,
|
H A D | krl.h | 42 struct sshkey; 51 const struct sshkey *ca_key, u_int64_t serial); 53 const struct sshkey *ca_key, u_int64_t lo, u_int64_t hi); 55 const struct sshkey *ca_key, const char *key_id); 56 int ssh_krl_revoke_key_explicit(struct ssh_krl *krl, const struct sshkey *key); 59 int ssh_krl_revoke_key(struct ssh_krl *krl, const struct sshkey *key); 62 int ssh_krl_check_key(struct ssh_krl *krl, const struct sshkey *key); 63 int ssh_krl_file_contains_key(const char *path, const struct sshkey *key);
|
H A D | authfd.h | 20 struct sshkey; 25 struct sshkey **keys; 35 struct sshkey **keys; 50 int ssh_add_identity_constrained(int sock, struct sshkey *key, 54 int ssh_agent_has_key(int sock, const struct sshkey *key); 55 int ssh_remove_identity(int sock, const struct sshkey *key); 60 int cert_only, struct sshkey **certs, size_t ncerts); 63 int ssh_agent_sign(int sock, const struct sshkey *key, 67 int ssh_agent_bind_hostkey(int sock, const struct sshkey *key,
|
H A D | authfile.c | 68 sshkey_save_private(struct sshkey *key, const char *filename, in sshkey_save_private() 119 struct sshkey **keyp, char **commentp) in sshkey_load_private_type() 145 struct sshkey **keyp, char **commentp) in sshkey_load_private() 153 struct sshkey **keyp, char **commentp) in sshkey_load_private_type_fd() 174 sshkey_load_pubkey_from_private(const char *filename, struct sshkey **pubkeyp) in sshkey_load_pubkey_from_private() 177 struct sshkey *pubkey = NULL; in sshkey_load_pubkey_from_private() 205 sshkey_try_load_public(struct sshkey **kp, const char *filename, in sshkey_try_load_public() 212 struct sshkey *k = NULL; in sshkey_try_load_public() 265 sshkey_load_public(const char *filename, struct sshkey **keyp, char **commentp) in sshkey_load_public() 301 sshkey_load_cert(const char *filename, struct sshkey **keyp) in sshkey_load_cert() [all …]
|
H A D | ssh-pkcs11.h | 27 int pkcs11_add_provider(char *, char *, struct sshkey ***, char ***); 30 struct sshkey * 33 struct sshkey * 39 int pkcs11_make_cert(const struct sshkey *, 40 const struct sshkey *, struct sshkey **);
|
H A D | sshkey.c | 93 int sshkey_private_serialize_opt(struct sshkey *key, 96 struct sshkey **keyp, int allow_cert); 202 sshkey_impl_from_key(const struct sshkey *k) in sshkey_impl_from_key() 210 sshkey_type(const struct sshkey *k) in sshkey_type() 240 sshkey_ssh_name(const struct sshkey *k) in sshkey_ssh_name() 246 sshkey_ssh_name_plain(const struct sshkey *k) in sshkey_ssh_name_plain() 406 sshkey_size(const struct sshkey *k) in sshkey_size() 429 sshkey_is_cert(const struct sshkey *k) in sshkey_is_cert() 437 sshkey_is_sk(const struct sshkey *k) in sshkey_is_sk() 715 struct sshkey * [all …]
|
H A D | ssh-ed25519.c | 36 ssh_ed25519_cleanup(struct sshkey *k) in ssh_ed25519_cleanup() 45 ssh_ed25519_equal(const struct sshkey *a, const struct sshkey *b) in ssh_ed25519_equal() 55 ssh_ed25519_serialize_public(const struct sshkey *key, struct sshbuf *b, in ssh_ed25519_serialize_public() 69 ssh_ed25519_serialize_private(const struct sshkey *key, struct sshbuf *b, in ssh_ed25519_serialize_private() 82 ssh_ed25519_generate(struct sshkey *k, int bits) in ssh_ed25519_generate() 92 ssh_ed25519_copy_public(const struct sshkey *from, struct sshkey *to) in ssh_ed25519_copy_public() 104 struct sshkey *key) in ssh_ed25519_deserialize_public() 122 struct sshkey *key) in ssh_ed25519_deserialize_private() 146 ssh_ed25519_sign(struct sshkey *key, in ssh_ed25519_sign() 205 ssh_ed25519_verify(const struct sshkey *key, in ssh_ed25519_verify()
|
H A D | sshconnect.h | 27 struct sshkey; 31 struct sshkey **keys; 79 int verify_host_key(char *, struct sockaddr *, struct sshkey *, 93 void maybe_add_key_to_agent(const char *, struct sshkey *, 98 const struct sshkey *, const char *); 100 int hostkey_accepted_by_hostkeyalgs(const struct sshkey *);
|
H A D | sshkey-xmss.c | 79 int sshkey_xmss_init_bds_state(struct sshkey *); 80 int sshkey_xmss_init_enc_key(struct sshkey *, const char *); 81 void sshkey_xmss_free_bds(struct sshkey *); 82 int sshkey_xmss_get_state_from_file(struct sshkey *, const char *, 84 int sshkey_xmss_encrypt_state(const struct sshkey *, struct sshbuf *, 86 int sshkey_xmss_decrypt_state(const struct sshkey *, struct sshbuf *, 88 int sshkey_xmss_serialize_enc_key(const struct sshkey *, struct sshbuf *); 89 int sshkey_xmss_deserialize_enc_key(struct sshkey *, struct sshbuf *); 95 sshkey_xmss_init(struct sshkey *key, const char *name) in sshkey_xmss_init() 138 sshkey_xmss_free_state(struct sshkey *key) in sshkey_xmss_free_state() [all …]
|
H A D | ssh-ed25519-sk.c | 42 ssh_ed25519_sk_cleanup(struct sshkey *k) in ssh_ed25519_sk_cleanup() 49 ssh_ed25519_sk_equal(const struct sshkey *a, const struct sshkey *b) in ssh_ed25519_sk_equal() 59 ssh_ed25519_sk_serialize_public(const struct sshkey *key, struct sshbuf *b, in ssh_ed25519_sk_serialize_public() 73 ssh_ed25519_sk_serialize_private(const struct sshkey *key, struct sshbuf *b, in ssh_ed25519_sk_serialize_private() 87 ssh_ed25519_sk_copy_public(const struct sshkey *from, struct sshkey *to) in ssh_ed25519_sk_copy_public() 100 struct sshkey *key) in ssh_ed25519_sk_deserialize_public() 113 struct sshkey *key) in ssh_ed25519_sk_deserialize_private() 125 ssh_ed25519_sk_verify(const struct sshkey *key, in ssh_ed25519_sk_verify()
|
H A D | kex.h | 163 struct sshkey *initial_hostkey; 169 int (*verify_host_key)(struct sshkey *, struct ssh *); 170 struct sshkey *(*load_host_public_key)(int, int, struct ssh *); 171 struct sshkey *(*load_host_private_key)(int, int, struct ssh *); 172 int (*host_key_index)(struct sshkey *, int, struct ssh *); 173 int (*sign)(struct ssh *, struct sshkey *, struct sshkey *, 212 int kex_load_hostkey(struct ssh *, struct sshkey **, struct sshkey **); 213 int kex_verify_host_key(struct ssh *, struct sshkey *);
|
H A D | monitor_wrap.h | 36 struct sshkey; 45 int mm_sshkey_sign(struct ssh *, struct sshkey *, u_char **, size_t *, 52 int mm_key_allowed(enum mm_keytype, const char *, const char *, struct sshkey *, 54 int mm_user_key_allowed(struct ssh *ssh, struct passwd *, struct sshkey *, int, 57 const char *, struct sshkey *); 58 int mm_sshkey_verify(const struct sshkey *, const u_char *, size_t,
|
H A D | hostfile.h | 29 struct sshkey *key; 45 HostStatus check_key_in_hostkeys(struct hostkeys *, struct sshkey *, 51 int hostfile_read_key(char **, u_int *, struct sshkey *); 53 const struct sshkey *, int); 56 const char *host, const char *ip, struct sshkey **keys, size_t nkeys, 101 struct sshkey *key; /* Key, if parsed ok and HKF_WANT_MATCH_HOST set */
|
H A D | ssh-dss.c | 51 ssh_dss_size(const struct sshkey *key) in ssh_dss_size() 62 ssh_dss_alloc(struct sshkey *k) in ssh_dss_alloc() 70 ssh_dss_cleanup(struct sshkey *k) in ssh_dss_cleanup() 77 ssh_dss_equal(const struct sshkey *a, const struct sshkey *b) in ssh_dss_equal() 105 ssh_dss_serialize_public(const struct sshkey *key, struct sshbuf *b, in ssh_dss_serialize_public() 128 ssh_dss_serialize_private(const struct sshkey *key, struct sshbuf *b, in ssh_dss_serialize_private() 146 ssh_dss_generate(struct sshkey *k, int bits) in ssh_dss_generate() 164 ssh_dss_copy_public(const struct sshkey *from, struct sshkey *to) in ssh_dss_copy_public() 202 struct sshkey *key) in ssh_dss_deserialize_public() 239 struct sshkey *key) in ssh_dss_deserialize_private() [all …]
|
H A D | ssh-ecdsa.c | 104 ssh_ecdsa_size(const struct sshkey *key) in ssh_ecdsa_size() 121 ssh_ecdsa_cleanup(struct sshkey *k) in ssh_ecdsa_cleanup() 128 ssh_ecdsa_equal(const struct sshkey *a, const struct sshkey *b) in ssh_ecdsa_equal() 136 ssh_ecdsa_serialize_public(const struct sshkey *key, struct sshbuf *b, in ssh_ecdsa_serialize_public() 152 ssh_ecdsa_serialize_private(const struct sshkey *key, struct sshbuf *b, in ssh_ecdsa_serialize_private() 168 ssh_ecdsa_generate(struct sshkey *k, int bits) in ssh_ecdsa_generate() 197 ssh_ecdsa_copy_public(const struct sshkey *from, struct sshkey *to) in ssh_ecdsa_copy_public() 232 struct sshkey *key) in ssh_ecdsa_deserialize_public() 285 struct sshkey *key) in ssh_ecdsa_deserialize_private() 320 ssh_ecdsa_sign(struct sshkey *key, in ssh_ecdsa_sign() [all …]
|
H A D | ssh-xmss.c | 43 ssh_xmss_cleanup(struct sshkey *k) in ssh_xmss_cleanup() 57 ssh_xmss_equal(const struct sshkey *a, const struct sshkey *b) in ssh_xmss_equal() 69 ssh_xmss_serialize_public(const struct sshkey *key, struct sshbuf *b, in ssh_xmss_serialize_public() 87 ssh_xmss_serialize_private(const struct sshkey *key, struct sshbuf *b, in ssh_xmss_serialize_private() 107 ssh_xmss_copy_public(const struct sshkey *from, struct sshkey *to) in ssh_xmss_copy_public() 133 struct sshkey *key) in ssh_xmss_deserialize_public() 165 struct sshkey *key) in ssh_xmss_deserialize_private() 201 ssh_xmss_sign(struct sshkey *key, in ssh_xmss_sign() 277 ssh_xmss_verify(const struct sshkey *key, in ssh_xmss_verify()
|
H A D | ssh-sk.h | 22 struct sshkey; 35 struct sshkey *key; 53 struct sshkey **keyp, struct sshbuf *attest); 61 int sshsk_sign(const char *provider_path, struct sshkey *key,
|
/freebsd/crypto/openssh/regress/unittests/sshkey/ |
H A D | common.h | 18 const BIGNUM *rsa_n(struct sshkey *k); 19 const BIGNUM *rsa_e(struct sshkey *k); 20 const BIGNUM *rsa_p(struct sshkey *k); 21 const BIGNUM *rsa_q(struct sshkey *k); 22 const BIGNUM *dsa_g(struct sshkey *k); 23 const BIGNUM *dsa_pub_key(struct sshkey *k); 24 const BIGNUM *dsa_priv_key(struct sshkey *k);
|
H A D | common.c | 87 rsa_n(struct sshkey *k) in rsa_n() 98 rsa_e(struct sshkey *k) in rsa_e() 109 rsa_p(struct sshkey *k) in rsa_p() 120 rsa_q(struct sshkey *k) in rsa_q() 131 dsa_g(struct sshkey *k) in dsa_g() 142 dsa_pub_key(struct sshkey *k) in dsa_pub_key() 153 dsa_priv_key(struct sshkey *k) in dsa_priv_key()
|
/freebsd/crypto/openssh/regress/misc/fuzz-harness/ |
H A D | sig_fuzz.cc | 15 static struct sshkey *generate_or_die(int type, unsigned bits) { in generate_or_die() 17 struct sshkey *ret; in generate_or_die() 28 static struct sshkey *rsa = generate_or_die(KEY_RSA, 2048); in LLVMFuzzerTestOneInput() 29 static struct sshkey *ecdsa256 = generate_or_die(KEY_ECDSA, 256); in LLVMFuzzerTestOneInput() 30 static struct sshkey *ecdsa384 = generate_or_die(KEY_ECDSA, 384); in LLVMFuzzerTestOneInput() 31 static struct sshkey *ecdsa521 = generate_or_die(KEY_ECDSA, 521); in LLVMFuzzerTestOneInput() 34 static struct sshkey *ed25519 = generate_or_die(KEY_ED25519, 0); in LLVMFuzzerTestOneInput()
|
H A D | agent_fuzz_helper.c | 21 static struct sshkey * 25 struct sshkey *pubkey; in pubkey_or_die() 39 static struct sshkey * 44 struct sshkey *privkey; in privkey_or_die() 63 struct sshkey *cert; in add_key() 179 pkcs11_make_cert(const struct sshkey *priv, in pkcs11_make_cert() 180 const struct sshkey *certpub, struct sshkey **certprivp) in pkcs11_make_cert()
|