summaryrefslogtreecommitdiff
path: root/sshkey.h
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2015-08-19 14:23:50 +0100
committerColin Watson <cjwatson@debian.org>2015-08-19 14:23:50 +0100
commitbaccdb349b31c47cd76fb63211f754ed33a9707e (patch)
treed03653f975fd4eb8bf71bb0c9d168614401202fa /sshkey.h
parent487bdb3a5ef6075887b830ccb8a0b14f6da78e93 (diff)
parent9f82e5a9042f2d872e98f48a876fcab3e25dd9bb (diff)
Import openssh_6.8p1.orig.tar.gz
Diffstat (limited to 'sshkey.h')
-rw-r--r--sshkey.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/sshkey.h b/sshkey.h
index 450b30c1f..62c1c3e2f 100644
--- a/sshkey.h
+++ b/sshkey.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshkey.h,v 1.1 2014/06/24 01:16:58 djm Exp $ */ 1/* $OpenBSD: sshkey.h,v 1.5 2015/01/26 02:59:11 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -67,16 +67,14 @@ enum sshkey_types {
67 KEY_UNSPEC 67 KEY_UNSPEC
68}; 68};
69 69
70/* Fingerprint hash algorithms */ 70/* Default fingerprint hash */
71enum sshkey_fp_type { 71#define SSH_FP_HASH_DEFAULT SSH_DIGEST_SHA256
72 SSH_FP_SHA1,
73 SSH_FP_MD5,
74 SSH_FP_SHA256
75};
76 72
77/* Fingerprint representation formats */ 73/* Fingerprint representation formats */
78enum sshkey_fp_rep { 74enum sshkey_fp_rep {
75 SSH_FP_DEFAULT = 0,
79 SSH_FP_HEX, 76 SSH_FP_HEX,
77 SSH_FP_BASE64,
80 SSH_FP_BUBBLEBABBLE, 78 SSH_FP_BUBBLEBABBLE,
81 SSH_FP_RANDOMART 79 SSH_FP_RANDOMART
82}; 80};
@@ -124,9 +122,9 @@ int sshkey_equal_public(const struct sshkey *,
124 const struct sshkey *); 122 const struct sshkey *);
125int sshkey_equal(const struct sshkey *, const struct sshkey *); 123int sshkey_equal(const struct sshkey *, const struct sshkey *);
126char *sshkey_fingerprint(const struct sshkey *, 124char *sshkey_fingerprint(const struct sshkey *,
127 enum sshkey_fp_type, enum sshkey_fp_rep); 125 int, enum sshkey_fp_rep);
128int sshkey_fingerprint_raw(const struct sshkey *k, 126int sshkey_fingerprint_raw(const struct sshkey *k,
129 enum sshkey_fp_type dgst_type, u_char **retp, size_t *lenp); 127 int, u_char **retp, size_t *lenp);
130const char *sshkey_type(const struct sshkey *); 128const char *sshkey_type(const struct sshkey *);
131const char *sshkey_cert_type(const struct sshkey *); 129const char *sshkey_cert_type(const struct sshkey *);
132int sshkey_write(const struct sshkey *, FILE *); 130int sshkey_write(const struct sshkey *, FILE *);
@@ -158,14 +156,17 @@ int sshkey_ec_validate_public(const EC_GROUP *, const EC_POINT *);
158int sshkey_ec_validate_private(const EC_KEY *); 156int sshkey_ec_validate_private(const EC_KEY *);
159const char *sshkey_ssh_name(const struct sshkey *); 157const char *sshkey_ssh_name(const struct sshkey *);
160const char *sshkey_ssh_name_plain(const struct sshkey *); 158const char *sshkey_ssh_name_plain(const struct sshkey *);
161int sshkey_names_valid2(const char *); 159int sshkey_names_valid2(const char *, int);
162char *key_alg_list(int, int); 160char *key_alg_list(int, int);
163 161
164int sshkey_from_blob(const u_char *, size_t, struct sshkey **); 162int sshkey_from_blob(const u_char *, size_t, struct sshkey **);
165int sshkey_to_blob_buf(const struct sshkey *, struct sshbuf *); 163int sshkey_fromb(struct sshbuf *, struct sshkey **);
164int sshkey_froms(struct sshbuf *, struct sshkey **);
166int sshkey_to_blob(const struct sshkey *, u_char **, size_t *); 165int sshkey_to_blob(const struct sshkey *, u_char **, size_t *);
167int sshkey_plain_to_blob_buf(const struct sshkey *, struct sshbuf *); 166int sshkey_putb(const struct sshkey *, struct sshbuf *);
167int sshkey_puts(const struct sshkey *, struct sshbuf *);
168int sshkey_plain_to_blob(const struct sshkey *, u_char **, size_t *); 168int sshkey_plain_to_blob(const struct sshkey *, u_char **, size_t *);
169int sshkey_putb_plain(const struct sshkey *, struct sshbuf *);
169 170
170int sshkey_sign(const struct sshkey *, u_char **, size_t *, 171int sshkey_sign(const struct sshkey *, u_char **, size_t *,
171 const u_char *, size_t, u_int); 172 const u_char *, size_t, u_int);
@@ -186,8 +187,6 @@ int sshkey_private_to_fileblob(struct sshkey *key, struct sshbuf *blob,
186 int force_new_format, const char *new_format_cipher, int new_format_rounds); 187 int force_new_format, const char *new_format_cipher, int new_format_rounds);
187int sshkey_parse_public_rsa1_fileblob(struct sshbuf *blob, 188int sshkey_parse_public_rsa1_fileblob(struct sshbuf *blob,
188 struct sshkey **keyp, char **commentp); 189 struct sshkey **keyp, char **commentp);
189int sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type,
190 const char *passphrase, struct sshkey **keyp, char **commentp);
191int sshkey_parse_private_fileblob(struct sshbuf *buffer, 190int sshkey_parse_private_fileblob(struct sshbuf *buffer,
192 const char *passphrase, const char *filename, struct sshkey **keyp, 191 const char *passphrase, const char *filename, struct sshkey **keyp,
193 char **commentp); 192 char **commentp);