diff options
author | Colin Watson <cjwatson@debian.org> | 2015-08-19 14:23:50 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2015-08-19 14:23:50 +0100 |
commit | baccdb349b31c47cd76fb63211f754ed33a9707e (patch) | |
tree | d03653f975fd4eb8bf71bb0c9d168614401202fa /sshkey.h | |
parent | 487bdb3a5ef6075887b830ccb8a0b14f6da78e93 (diff) | |
parent | 9f82e5a9042f2d872e98f48a876fcab3e25dd9bb (diff) |
Import openssh_6.8p1.orig.tar.gz
Diffstat (limited to 'sshkey.h')
-rw-r--r-- | sshkey.h | 27 |
1 files changed, 13 insertions, 14 deletions
@@ -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 */ |
71 | enum 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 */ |
78 | enum sshkey_fp_rep { | 74 | enum 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 *); |
125 | int sshkey_equal(const struct sshkey *, const struct sshkey *); | 123 | int sshkey_equal(const struct sshkey *, const struct sshkey *); |
126 | char *sshkey_fingerprint(const struct sshkey *, | 124 | char *sshkey_fingerprint(const struct sshkey *, |
127 | enum sshkey_fp_type, enum sshkey_fp_rep); | 125 | int, enum sshkey_fp_rep); |
128 | int sshkey_fingerprint_raw(const struct sshkey *k, | 126 | int 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); |
130 | const char *sshkey_type(const struct sshkey *); | 128 | const char *sshkey_type(const struct sshkey *); |
131 | const char *sshkey_cert_type(const struct sshkey *); | 129 | const char *sshkey_cert_type(const struct sshkey *); |
132 | int sshkey_write(const struct sshkey *, FILE *); | 130 | int sshkey_write(const struct sshkey *, FILE *); |
@@ -158,14 +156,17 @@ int sshkey_ec_validate_public(const EC_GROUP *, const EC_POINT *); | |||
158 | int sshkey_ec_validate_private(const EC_KEY *); | 156 | int sshkey_ec_validate_private(const EC_KEY *); |
159 | const char *sshkey_ssh_name(const struct sshkey *); | 157 | const char *sshkey_ssh_name(const struct sshkey *); |
160 | const char *sshkey_ssh_name_plain(const struct sshkey *); | 158 | const char *sshkey_ssh_name_plain(const struct sshkey *); |
161 | int sshkey_names_valid2(const char *); | 159 | int sshkey_names_valid2(const char *, int); |
162 | char *key_alg_list(int, int); | 160 | char *key_alg_list(int, int); |
163 | 161 | ||
164 | int sshkey_from_blob(const u_char *, size_t, struct sshkey **); | 162 | int sshkey_from_blob(const u_char *, size_t, struct sshkey **); |
165 | int sshkey_to_blob_buf(const struct sshkey *, struct sshbuf *); | 163 | int sshkey_fromb(struct sshbuf *, struct sshkey **); |
164 | int sshkey_froms(struct sshbuf *, struct sshkey **); | ||
166 | int sshkey_to_blob(const struct sshkey *, u_char **, size_t *); | 165 | int sshkey_to_blob(const struct sshkey *, u_char **, size_t *); |
167 | int sshkey_plain_to_blob_buf(const struct sshkey *, struct sshbuf *); | 166 | int sshkey_putb(const struct sshkey *, struct sshbuf *); |
167 | int sshkey_puts(const struct sshkey *, struct sshbuf *); | ||
168 | int sshkey_plain_to_blob(const struct sshkey *, u_char **, size_t *); | 168 | int sshkey_plain_to_blob(const struct sshkey *, u_char **, size_t *); |
169 | int sshkey_putb_plain(const struct sshkey *, struct sshbuf *); | ||
169 | 170 | ||
170 | int sshkey_sign(const struct sshkey *, u_char **, size_t *, | 171 | int 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); |
187 | int sshkey_parse_public_rsa1_fileblob(struct sshbuf *blob, | 188 | int sshkey_parse_public_rsa1_fileblob(struct sshbuf *blob, |
188 | struct sshkey **keyp, char **commentp); | 189 | struct sshkey **keyp, char **commentp); |
189 | int sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type, | ||
190 | const char *passphrase, struct sshkey **keyp, char **commentp); | ||
191 | int sshkey_parse_private_fileblob(struct sshbuf *buffer, | 190 | int 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); |