Home
last modified time | relevance | path

Searched refs:sshbuf (Results 1 – 25 of 136) sorted by relevance

123456

/freebsd/crypto/openssh/
H A Dsshbuf.h38 struct sshbuf;
44 struct sshbuf *sshbuf_new(void);
50 struct sshbuf *sshbuf_from(const void *blob, size_t len);
58 struct sshbuf *sshbuf_fromb(struct sshbuf *buf);
68 int sshbuf_froms(struct sshbuf *buf, struct sshbuf **bufp);
73 void sshbuf_free(struct sshbuf *buf);
78 void sshbuf_reset(struct sshbuf *buf);
83 size_t sshbuf_max_size(const struct sshbuf *buf);
89 int sshbuf_set_max_size(struct sshbuf *buf, size_t max_size);
94 size_t sshbuf_len(const struct sshbuf *buf);
[all …]
H A Dkex.h145 struct sshbuf;
162 struct sshbuf *my;
163 struct sshbuf *peer;
164 struct sshbuf *client_version;
165 struct sshbuf *server_version;
166 struct sshbuf *session_id;
167 struct sshbuf *initial_sig;
190 struct sshbuf *client_pub;
215 int kex_buf2prop(struct sshbuf *, int *, char ***);
216 int kex_prop2buf(struct sshbuf *, char *proposal[PROPOSAL_MAX]);
[all …]
H A Dsshkey.h56 struct sshbuf;
103 struct sshbuf *certblob; /* Kept around for use on wire */
110 struct sshbuf *critical;
111 struct sshbuf *extensions;
130 struct sshbuf *sk_key_handle;
131 struct sshbuf *sk_reserved;
155 int (*serialize_public)(const struct sshkey *, struct sshbuf *,
157 int (*deserialize_public)(const char *, struct sshbuf *,
159 int (*serialize_private)(const struct sshkey *, struct sshbuf *,
161 int (*deserialize_private)(const char *, struct sshbuf *,
[all …]
H A Dsshbuf.c42 struct sshbuf { struct
51 struct sshbuf *parent; /* If child, pointer to parent */ argument
55 sshbuf_check_sanity(const struct sshbuf *buf) in sshbuf_check_sanity()
77 sshbuf_maybe_pack(struct sshbuf *buf, int force) in sshbuf_maybe_pack()
92 struct sshbuf *
95 struct sshbuf *ret; in sshbuf_new()
111 struct sshbuf *
114 struct sshbuf *ret; in sshbuf_from()
129 sshbuf_set_parent(struct sshbuf *child, struct sshbuf *parent) in sshbuf_set_parent()
144 struct sshbuf *
[all …]
H A Dsshbuf-getput-basic.c33 sshbuf_get(struct sshbuf *buf, void *v, size_t len) in sshbuf_get()
46 sshbuf_get_u64(struct sshbuf *buf, uint64_t *valp) in sshbuf_get_u64()
59 sshbuf_get_u32(struct sshbuf *buf, uint32_t *valp) in sshbuf_get_u32()
72 sshbuf_get_u16(struct sshbuf *buf, uint16_t *valp) in sshbuf_get_u16()
85 sshbuf_get_u8(struct sshbuf *buf, u_char *valp) in sshbuf_get_u8()
98 check_offset(const struct sshbuf *buf, int wr, size_t offset, size_t len) in check_offset()
112 check_roffset(const struct sshbuf *buf, size_t offset, size_t len, in check_roffset()
125 sshbuf_peek_u64(const struct sshbuf *buf, size_t offset, uint64_t *valp) in sshbuf_peek_u64()
140 sshbuf_peek_u32(const struct sshbuf *buf, size_t offset, uint32_t *valp) in sshbuf_peek_u32()
155 sshbuf_peek_u16(const struct sshbuf *buf, size_t offset, uint16_t *valp) in sshbuf_peek_u16()
[all …]
H A Dsshsig.h21 struct sshbuf;
38 const char *sk_provider, const char *sk_pin, const struct sshbuf *message,
39 const char *sig_namespace, struct sshbuf **out,
47 int sshsig_verifyb(struct sshbuf *signature,
48 const struct sshbuf *message, const char *sig_namespace,
61 struct sshbuf **out, sshsig_signer *signer, void *signer_ctx);
68 int sshsig_verify_fd(struct sshbuf *signature, int fd,
77 int sshsig_armor(const struct sshbuf *blob, struct sshbuf **out);
82 int sshsig_dearmor(struct sshbuf *sig, struct sshbuf **out);
99 int sshsig_get_pubkey(struct sshbuf *signature, struct sshkey **pubkey);
H A Dkexecdh.c45 kex_ecdh_dec_key_group(struct kex *, const struct sshbuf *, EC_KEY *key,
46 const EC_GROUP *, struct sshbuf **);
54 struct sshbuf *buf = NULL; in kex_ecdh_keypair()
91 kex_ecdh_enc(struct kex *kex, const struct sshbuf *client_blob, in kex_ecdh_enc()
92 struct sshbuf **server_blobp, struct sshbuf **shared_secretp) in kex_ecdh_enc()
97 struct sshbuf *server_blob = NULL; in kex_ecdh_enc()
137 kex_ecdh_dec_key_group(struct kex *kex, const struct sshbuf *ec_blob, in kex_ecdh_dec_key_group()
138 EC_KEY *key, const EC_GROUP *group, struct sshbuf **shared_secretp) in kex_ecdh_dec_key_group()
140 struct sshbuf *buf = NULL; in kex_ecdh_dec_key_group()
199 kex_ecdh_dec(struct kex *kex, const struct sshbuf *server_blob, in kex_ecdh_dec()
[all …]
H A Dkexsntrup761x25519.c49 struct sshbuf *buf = NULL; in kex_kem_sntrup761x25519_keypair()
78 const struct sshbuf *client_blob, struct sshbuf **server_blobp, in kex_kem_sntrup761x25519_enc()
79 struct sshbuf **shared_secretp) in kex_kem_sntrup761x25519_enc()
81 struct sshbuf *server_blob = NULL; in kex_kem_sntrup761x25519_enc()
82 struct sshbuf *buf = NULL; in kex_kem_sntrup761x25519_enc()
165 const struct sshbuf *server_blob, struct sshbuf **shared_secretp) in kex_kem_sntrup761x25519_dec()
167 struct sshbuf *buf = NULL; in kex_kem_sntrup761x25519_dec()
232 struct sshbuf;
243 const struct sshbuf *client_blob, struct sshbuf **server_blobp, in kex_kem_sntrup761x25519_enc()
244 struct sshbuf **shared_secretp) in kex_kem_sntrup761x25519_enc()
[all …]
H A Dsshbuf-misc.c65 sshbuf_dump(const struct sshbuf *buf, FILE *f) in sshbuf_dump()
72 sshbuf_dtob16(const struct sshbuf *buf) in sshbuf_dtob16()
103 struct sshbuf *
106 struct sshbuf *ret; in sshbuf_b16tod()
128 sshbuf_dtob64(const struct sshbuf *d, struct sshbuf *b64, int wrap) in sshbuf_dtob64()
166 sshbuf_dtob64_string(const struct sshbuf *buf, int wrap) in sshbuf_dtob64_string()
168 struct sshbuf *tmp; in sshbuf_dtob64_string()
183 sshbuf_b64tod(struct sshbuf *buf, const char *b64) in sshbuf_b64tod()
206 sshbuf_dtourlb64(const struct sshbuf *d, struct sshbuf *b64, int wrap) in sshbuf_dtourlb64()
210 struct sshbuf *b = NULL; in sshbuf_dtourlb64()
[all …]
H A Dkexc25519.c60 const u_char pub[CURVE25519_SIZE], struct sshbuf *out, int raw) in kexc25519_shared_key_ext()
86 const u_char pub[CURVE25519_SIZE], struct sshbuf *out) in kexc25519_shared_key()
94 struct sshbuf *buf = NULL; in kex_c25519_keypair()
114 kex_c25519_enc(struct kex *kex, const struct sshbuf *client_blob, in kex_c25519_enc()
115 struct sshbuf **server_blobp, struct sshbuf **shared_secretp) in kex_c25519_enc()
117 struct sshbuf *server_blob = NULL; in kex_c25519_enc()
118 struct sshbuf *buf = NULL; in kex_c25519_enc()
166 kex_c25519_dec(struct kex *kex, const struct sshbuf *server_blob, in kex_c25519_dec()
167 struct sshbuf **shared_secretp) in kex_c25519_dec()
169 struct sshbuf *buf = NULL; in kex_c25519_dec()
H A Dkexmlkem768x25519.c51 struct sshbuf *buf = NULL; in kex_kem_mlkem768x25519_keypair()
89 const struct sshbuf *client_blob, struct sshbuf **server_blobp, in kex_kem_mlkem768x25519_enc()
90 struct sshbuf **shared_secretp) in kex_kem_mlkem768x25519_enc()
92 struct sshbuf *server_blob = NULL; in kex_kem_mlkem768x25519_enc()
93 struct sshbuf *buf = NULL; in kex_kem_mlkem768x25519_enc()
188 const struct sshbuf *server_blob, struct sshbuf **shared_secretp) in kex_kem_mlkem768x25519_dec()
190 struct sshbuf *buf = NULL; in kex_kem_mlkem768x25519_dec()
267 const struct sshbuf *client_blob, struct sshbuf **server_blobp, in kex_kem_mlkem768x25519_enc()
268 struct sshbuf **shared_secretp) in kex_kem_mlkem768x25519_enc()
275 const struct sshbuf *server_blob, struct sshbuf **shared_secretp) in kex_kem_mlkem768x25519_dec()
H A Dkexgen.c50 const struct sshbuf *client_version, in kex_gen_hash()
51 const struct sshbuf *server_version, in kex_gen_hash()
52 const struct sshbuf *client_kexinit, in kex_gen_hash()
53 const struct sshbuf *server_kexinit, in kex_gen_hash()
54 const struct sshbuf *server_host_key_blob, in kex_gen_hash()
55 const struct sshbuf *client_pub, in kex_gen_hash()
56 const struct sshbuf *server_pub, in kex_gen_hash()
57 const struct sshbuf *shared_secret, in kex_gen_hash()
60 struct sshbuf *b; in kex_gen_hash()
146 struct sshbuf *shared_secret = NULL; in input_kex_gen_reply()
[all …]
H A Dmonitor.c100 extern struct sshbuf *cfg;
101 extern struct sshbuf *loginmsg;
106 static struct sshbuf *child_state;
110 int mm_answer_moduli(struct ssh *, int, struct sshbuf *);
111 int mm_answer_setcompat(struct ssh *, int, struct sshbuf *);
112 int mm_answer_sign(struct ssh *, int, struct sshbuf *);
113 int mm_answer_pwnamallow(struct ssh *, int, struct sshbuf *);
114 int mm_answer_auth2_read_banner(struct ssh *, int, struct sshbuf *);
115 int mm_answer_authserv(struct ssh *, int, struct sshbuf *);
116 int mm_answer_authpassword(struct ssh *, int, struct sshbuf *);
[all …]
H A Dmonitor_wrap.h66 void mm_decode_activate_server_options(struct ssh *ssh, struct sshbuf *m);
100 void mm_get_state(struct ssh *, struct include_list *, struct sshbuf *,
101 struct sshbuf **, uint64_t *, struct sshbuf **, struct sshbuf **,
102 u_char **, struct sshbuf **, struct sshbuf **);
H A Dmonitor_wrap.c83 extern struct sshbuf *loginmsg;
89 struct sshbuf *log_msg; in mm_log_handler()
151 mm_request_send(int sock, enum monitor_reqtype type, struct sshbuf *m) in mm_request_send()
174 mm_request_receive(int sock, struct sshbuf *m) in mm_request_receive()
206 mm_request_receive_expect(int sock, enum monitor_reqtype type, struct sshbuf *m) in mm_request_receive_expect()
227 struct sshbuf *m; in mm_choose_dh()
260 struct sshbuf *m; in mm_sshkey_setcompat()
277 struct sshbuf *m; in mm_sshkey_sign()
303 mm_decode_activate_server_options(struct ssh *ssh, struct sshbuf *m) in mm_decode_activate_server_options()
368 struct sshbuf *m; in mm_getpwnamallow()
[all …]
H A Dkexdh.c71 kex_dh_compute_key(struct kex *kex, BIGNUM *dh_pub, struct sshbuf *out) in kex_dh_compute_key()
116 struct sshbuf *buf = NULL; in kex_dh_keypair()
141 kex_dh_enc(struct kex *kex, const struct sshbuf *client_blob, in kex_dh_enc()
142 struct sshbuf **server_blobp, struct sshbuf **shared_secretp) in kex_dh_enc()
145 struct sshbuf *server_blob = NULL; in kex_dh_enc()
173 kex_dh_dec(struct kex *kex, const struct sshbuf *dh_blob, in kex_dh_dec()
174 struct sshbuf **shared_secretp) in kex_dh_dec()
176 struct sshbuf *buf = NULL; in kex_dh_dec()
H A Dmonitor.h71 struct sshbuf;
96 void mm_request_send(int, enum monitor_reqtype, struct sshbuf *);
97 void mm_request_receive(int, struct sshbuf *);
98 void mm_request_receive_expect(int, enum monitor_reqtype, struct sshbuf *);
102 void mm_encode_server_options(struct sshbuf *);
104 struct sshbuf *pack_hostkeys(void);
H A Dsshsig.c49 sshsig_armor(const struct sshbuf *blob, struct sshbuf **out) in sshsig_armor()
51 struct sshbuf *buf = NULL; in sshsig_armor()
88 sshsig_dearmor(struct sshbuf *sig, struct sshbuf **out) in sshsig_dearmor()
92 struct sshbuf *buf = NULL; in sshsig_dearmor()
93 struct sshbuf *sbuf = NULL; in sshsig_dearmor()
165 const char *sk_provider, const char *sk_pin, const struct sshbuf *h_message, in sshsig_wrap_sign()
166 const char *sig_namespace, struct sshbuf **out, in sshsig_wrap_sign()
172 struct sshbuf *blob = NULL; in sshsig_wrap_sign()
173 struct sshbuf *tosign = NULL; in sshsig_wrap_sign()
242 sshsig_parse_preamble(struct sshbuf *buf) in sshsig_parse_preamble()
[all …]
H A Dauthfd.c137 ssh_request_reply(int sock, struct sshbuf *request, struct sshbuf *reply) in ssh_request_reply()
181 ssh_request_reply_decode(int sock, struct sshbuf *request) in ssh_request_reply_decode()
183 struct sshbuf *reply; in ssh_request_reply_decode()
218 struct sshbuf *msg; in ssh_lock_agent()
235 deserialise_identity2(struct sshbuf *ids, struct sshkey **keyp, char **commentp) in deserialise_identity2()
265 struct sshbuf *msg; in ssh_fetch_identitylist()
407 struct sshbuf *msg; in ssh_agent_sign()
464 encode_dest_constraint_hop(struct sshbuf *m, in encode_dest_constraint_hop()
467 struct sshbuf *b; in encode_dest_constraint_hop()
492 encode_dest_constraint(struct sshbuf *m, const struct dest_constraint *dc) in encode_dest_constraint()
[all …]
H A Dkexgex.c49 const struct sshbuf *client_version, in kexgex_hash()
50 const struct sshbuf *server_version, in kexgex_hash()
51 const struct sshbuf *client_kexinit, in kexgex_hash()
52 const struct sshbuf *server_kexinit, in kexgex_hash()
53 const struct sshbuf *server_host_key_blob, in kexgex_hash()
62 struct sshbuf *b; in kexgex_hash()
H A Dmux.c57 extern struct sshbuf *command;
66 struct sshbuf *cmd;
142 Channel *, struct sshbuf *, struct sshbuf *);
144 Channel *, struct sshbuf *, struct sshbuf *);
146 Channel *, struct sshbuf *, struct sshbuf *);
148 Channel *, struct sshbuf *, struct sshbuf *);
150 Channel *, struct sshbuf *, struct sshbuf *);
152 Channel *, struct sshbuf *, struct sshbuf *);
154 Channel *, struct sshbuf *, struct sshbuf *);
156 Channel *, struct sshbuf *, struct sshbuf *);
[all …]
H A Dssh-sk-helper.c53 static struct sshbuf *reply_error(int r, char *fmt, ...)
56 static struct sshbuf *
61 struct sshbuf *resp; in reply_error()
107 static struct sshbuf *
108 process_sign(struct sshbuf *req) in process_sign()
111 struct sshbuf *resp, *kbuf; in process_sign()
165 static struct sshbuf *
166 process_enroll(struct sshbuf *req) in process_enroll()
172 struct sshbuf *challenge, *attest, *kbuf, *resp; in process_enroll()
229 static struct sshbuf *
[all …]
H A Dsshbuf-getput-crypto.c36 sshbuf_get_bignum2(struct sshbuf *buf, BIGNUM **valp) in sshbuf_get_bignum2()
74 sshbuf_get_ec(struct sshbuf *buf, EC_POINT *v, const EC_GROUP *g) in sshbuf_get_ec()
95 sshbuf_get_eckey(struct sshbuf *buf, EC_KEY *v) in sshbuf_get_eckey()
131 sshbuf_put_bignum2(struct sshbuf *buf, const BIGNUM *v) in sshbuf_put_bignum2()
154 sshbuf_put_ec(struct sshbuf *buf, const EC_POINT *v, const EC_GROUP *g) in sshbuf_put_ec()
174 sshbuf_put_eckey(struct sshbuf *buf, const EC_KEY *v) in sshbuf_put_eckey()
181 sshbuf_put_ec_pkey(struct sshbuf *buf, EVP_PKEY *pkey) in sshbuf_put_ec_pkey()
/freebsd/crypto/openssh/regress/unittests/sshbuf/
H A DMakefile14 SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
15 SRCS+=sshbuf-io.c atomicio.c misc.c xmalloc.c log.c fatal.c ssherr.c cleanup.c
/freebsd/crypto/openssh/regress/unittests/sshsig/
H A DMakefile7 SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
8 SRCS+=sshbuf-io.c atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c

123456