24 #define KRL_MAGIC "SSHKRL\n\0" 25 #define KRL_FORMAT_VERSION 1 28 #define KRL_SECTION_CERTIFICATES 1 29 #define KRL_SECTION_EXPLICIT_KEY 2 30 #define KRL_SECTION_FINGERPRINT_SHA1 3 31 #define KRL_SECTION_SIGNATURE 4 34 #define KRL_SECTION_CERT_SERIAL_LIST 0x20 35 #define KRL_SECTION_CERT_SERIAL_RANGE 0x21 36 #define KRL_SECTION_CERT_SERIAL_BITMAP 0x22 37 #define KRL_SECTION_CERT_KEY_ID 0x23 43 struct ssh_krl *ssh_krl_init(
void);
44 void ssh_krl_free(
struct ssh_krl *krl);
45 void ssh_krl_set_version(
struct ssh_krl *krl, u_int64_t version);
46 int ssh_krl_set_comment(
struct ssh_krl *krl,
const char *comment);
47 int ssh_krl_revoke_cert_by_serial(
struct ssh_krl *krl,
48 const struct sshkey *ca_key, u_int64_t serial);
49 int ssh_krl_revoke_cert_by_serial_range(
struct ssh_krl *krl,
50 const struct sshkey *ca_key, u_int64_t lo, u_int64_t hi);
51 int ssh_krl_revoke_cert_by_key_id(
struct ssh_krl *krl,
52 const struct sshkey *ca_key,
const char *key_id);
53 int ssh_krl_revoke_key_explicit(
struct ssh_krl *krl,
const struct sshkey *key);
54 int ssh_krl_revoke_key_sha1(
struct ssh_krl *krl,
const struct sshkey *key);
55 int ssh_krl_revoke_key(
struct ssh_krl *krl,
const struct sshkey *key);
56 int ssh_krl_to_blob(
struct ssh_krl *krl,
struct sshbuf *buf,
57 const struct sshkey **sign_keys, u_int nsign_keys);
58 int ssh_krl_from_blob(
struct sshbuf *buf,
struct ssh_krl **krlp,
59 const struct sshkey **sign_ca_keys,
size_t nsign_ca_keys);
60 int ssh_krl_check_key(
struct ssh_krl *krl,
const struct sshkey *key);
61 int ssh_krl_file_contains_key(
const char *path,
const struct sshkey *key);