Lines Matching defs:sshkey

1 /* $OpenBSD: sshkey.h,v 1.65 2024/09/04 05:33:34 djm Exp $ */
116 struct sshkey *signature_key;
121 struct sshkey {
163 u_int (*size)(const struct sshkey *); /* optional */
164 int (*alloc)(struct sshkey *); /* optional */
165 void (*cleanup)(struct sshkey *); /* optional */
166 int (*equal)(const struct sshkey *, const struct sshkey *);
167 int (*serialize_public)(const struct sshkey *, struct sshbuf *,
170 struct sshkey *);
171 int (*serialize_private)(const struct sshkey *, struct sshbuf *,
174 struct sshkey *);
175 int (*generate)(struct sshkey *, int); /* optional */
176 int (*copy_public)(const struct sshkey *, struct sshkey *);
177 int (*sign)(struct sshkey *, u_char **, size_t *,
180 int (*verify)(const struct sshkey *, const u_char *, size_t,
197 struct sshkey *sshkey_new(int);
198 void sshkey_free(struct sshkey *);
199 int sshkey_equal_public(const struct sshkey *,
200 const struct sshkey *);
201 int sshkey_equal(const struct sshkey *, const struct sshkey *);
202 char *sshkey_fingerprint(const struct sshkey *,
204 int sshkey_fingerprint_raw(const struct sshkey *k,
206 const char *sshkey_type(const struct sshkey *);
207 const char *sshkey_cert_type(const struct sshkey *);
208 int sshkey_format_text(const struct sshkey *, struct sshbuf *);
209 int sshkey_write(const struct sshkey *, FILE *);
210 int sshkey_read(struct sshkey *, char **);
211 u_int sshkey_size(const struct sshkey *);
213 int sshkey_generate(int type, u_int bits, struct sshkey **keyp);
214 int sshkey_from_private(const struct sshkey *, struct sshkey **);
216 int sshkey_is_shielded(struct sshkey *);
217 int sshkey_shield_private(struct sshkey *);
218 int sshkey_unshield_private(struct sshkey *);
222 int sshkey_is_cert(const struct sshkey *);
223 int sshkey_is_sk(const struct sshkey *);
230 int sshkey_to_certified(struct sshkey *);
231 int sshkey_drop_cert(struct sshkey *);
232 int sshkey_cert_copy(const struct sshkey *, struct sshkey *);
233 int sshkey_cert_check_authority(const struct sshkey *, int, int, int,
235 int sshkey_cert_check_authority_now(const struct sshkey *, int, int, int,
237 int sshkey_cert_check_host(const struct sshkey *, const char *,
241 int sshkey_check_cert_sigtype(const struct sshkey *, const char *);
243 int sshkey_certify(struct sshkey *, struct sshkey *,
246 typedef int sshkey_certify_signer(struct sshkey *, u_char **, size_t *,
249 int sshkey_certify_custom(struct sshkey *, struct sshkey *, const char *,
262 const char *sshkey_ssh_name(const struct sshkey *);
263 const char *sshkey_ssh_name_plain(const struct sshkey *);
267 int sshkey_from_blob(const u_char *, size_t, struct sshkey **);
268 int sshkey_fromb(struct sshbuf *, struct sshkey **);
269 int sshkey_froms(struct sshbuf *, struct sshkey **);
270 int sshkey_to_blob(const struct sshkey *, u_char **, size_t *);
271 int sshkey_to_base64(const struct sshkey *, char **);
272 int sshkey_putb(const struct sshkey *, struct sshbuf *);
273 int sshkey_puts(const struct sshkey *, struct sshbuf *);
274 int sshkey_puts_opts(const struct sshkey *, struct sshbuf *,
276 int sshkey_plain_to_blob(const struct sshkey *, u_char **, size_t *);
277 int sshkey_putb_plain(const struct sshkey *, struct sshbuf *);
279 int sshkey_sign(struct sshkey *, u_char **, size_t *,
281 int sshkey_verify(const struct sshkey *, const u_char *, size_t,
298 int sshkey_private_serialize(struct sshkey *key, struct sshbuf *buf);
299 int sshkey_private_serialize_opt(struct sshkey *key, struct sshbuf *buf,
301 int sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **keyp);
304 int sshkey_private_to_fileblob(struct sshkey *key, struct sshbuf *blob,
308 const char *passphrase, struct sshkey **keyp, char **commentp);
310 const char *passphrase, struct sshkey **keyp, char **commentp);
312 int type, struct sshkey **pubkeyp);
314 int sshkey_check_rsa_length(const struct sshkey *, int);
320 int sshkey_set_filename(struct sshkey *, const char *);
321 int sshkey_enable_maxsign(struct sshkey *, u_int32_t);
322 u_int32_t sshkey_signatures_left(const struct sshkey *);
323 int sshkey_private_serialize_maxsign(struct sshkey *key,
333 int sshkey_sk_fields_equal(const struct sshkey *a, const struct sshkey *b);
334 void sshkey_sk_cleanup(struct sshkey *k);
335 int sshkey_serialize_sk(const struct sshkey *key, struct sshbuf *b);
336 int sshkey_copy_public_sk(const struct sshkey *from, struct sshkey *to);
337 int sshkey_deserialize_sk(struct sshbuf *b, struct sshkey *key);
338 int sshkey_serialize_private_sk(const struct sshkey *key,
340 int sshkey_private_deserialize_sk(struct sshbuf *buf, struct sshkey *k);