Home | History | Annotate | Download | only in dist

Lines Matching refs:sshkey

1 /*	$NetBSD: sshkey.h,v 1.25 2025/12/28 09:54:07 nia Exp $	*/
2 /* $OpenBSD: sshkey.h,v 1.70 2025/08/29 03:50:38 djm Exp $ */
108 struct sshkey *signature_key;
113 struct sshkey {
147 u_int (*size)(const struct sshkey *); /* optional */
148 int (*alloc)(struct sshkey *); /* optional */
149 void (*cleanup)(struct sshkey *); /* optional */
150 int (*equal)(const struct sshkey *, const struct sshkey *);
151 int (*serialize_public)(const struct sshkey *, struct sshbuf *,
154 struct sshkey *);
155 int (*serialize_private)(const struct sshkey *, struct sshbuf *,
158 struct sshkey *);
159 int (*generate)(struct sshkey *, int); /* optional */
160 int (*copy_public)(const struct sshkey *, struct sshkey *);
161 int (*sign)(struct sshkey *, u_char **, size_t *,
164 int (*verify)(const struct sshkey *, const u_char *, size_t,
181 struct sshkey *sshkey_new(int);
182 void sshkey_free(struct sshkey *);
183 int sshkey_equal_public(const struct sshkey *,
184 const struct sshkey *);
185 int sshkey_equal(const struct sshkey *, const struct sshkey *);
186 char *sshkey_fingerprint(const struct sshkey *,
188 int sshkey_fingerprint_raw(const struct sshkey *k,
190 const char *sshkey_type(const struct sshkey *);
191 const char *sshkey_cert_type(const struct sshkey *);
192 int sshkey_format_text(const struct sshkey *, struct sshbuf *);
193 int sshkey_write(const struct sshkey *, FILE *);
194 int sshkey_read(struct sshkey *, char **);
195 u_int sshkey_size(const struct sshkey *);
197 int sshkey_generate(int type, u_int bits, struct sshkey **keyp);
198 int sshkey_from_private(const struct sshkey *, struct sshkey **);
200 int sshkey_is_shielded(struct sshkey *);
201 int sshkey_shield_private(struct sshkey *);
202 int sshkey_unshield_private(struct sshkey *);
206 int sshkey_is_cert(const struct sshkey *);
207 int sshkey_is_sk(const struct sshkey *);
214 int sshkey_to_certified(struct sshkey *);
215 int sshkey_drop_cert(struct sshkey *);
216 int sshkey_cert_copy(const struct sshkey *, struct sshkey *);
217 int sshkey_cert_check_authority(const struct sshkey *, int, int, int,
219 int sshkey_cert_check_authority_now(const struct sshkey *, int, int, int,
221 int sshkey_cert_check_host(const struct sshkey *, const char *,
225 int sshkey_check_cert_sigtype(const struct sshkey *, const char *);
227 int sshkey_certify(struct sshkey *, struct sshkey *,
230 typedef int sshkey_certify_signer(struct sshkey *, u_char **, size_t *,
233 int sshkey_certify_custom(struct sshkey *, struct sshkey *, const char *,
246 const char *sshkey_ssh_name(const struct sshkey *);
247 const char *sshkey_ssh_name_plain(const struct sshkey *);
251 int sshkey_from_blob(const u_char *, size_t, struct sshkey **);
252 int sshkey_fromb(struct sshbuf *, struct sshkey **);
253 int sshkey_froms(struct sshbuf *, struct sshkey **);
254 int sshkey_to_blob(const struct sshkey *, u_char **, size_t *);
255 int sshkey_to_base64(const struct sshkey *, char **);
256 int sshkey_putb(const struct sshkey *, struct sshbuf *);
257 int sshkey_puts(const struct sshkey *, struct sshbuf *);
258 int sshkey_plain_to_blob(const struct sshkey *, u_char **, size_t *);
259 int sshkey_putb_plain(const struct sshkey *, struct sshbuf *);
260 int sshkey_puts_plain(const struct sshkey *, struct sshbuf *);
262 int sshkey_sign(struct sshkey *, u_char **, size_t *,
264 int sshkey_verify(const struct sshkey *, const u_char *, size_t,
281 int sshkey_private_serialize(struct sshkey *key, struct sshbuf *buf);
282 int sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **keyp);
285 int sshkey_private_to_fileblob(struct sshkey *key, struct sshbuf *blob,
289 const char *passphrase, struct sshkey **keyp, char **commentp);
291 const char *passphrase, struct sshkey **keyp, char **commentp);
293 int type, struct sshkey **pubkeyp);
295 int sshkey_check_rsa_length(const struct sshkey *, int);
307 int sshkey_sk_fields_equal(const struct sshkey *a, const struct sshkey *b);
308 void sshkey_sk_cleanup(struct sshkey *k);
309 int sshkey_serialize_sk(const struct sshkey *key, struct sshbuf *b);
310 int sshkey_copy_public_sk(const struct sshkey *from, struct sshkey *to);
311 int sshkey_deserialize_sk(struct sshbuf *b, struct sshkey *key);
312 int sshkey_serialize_private_sk(const struct sshkey *key,
314 int sshkey_private_deserialize_sk(struct sshbuf *buf, struct sshkey *k);
321 int ssh_ecdsa_encode_store_sig(const struct sshkey *,