Changeset View
Changeset View
Standalone View
Standalone View
krl.h
/* | /* | ||||
* Copyright (c) 2012 Damien Miller <djm@mindrot.org> | * Copyright (c) 2012 Damien Miller <djm@mindrot.org> | ||||
* | * | ||||
* Permission to use, copy, modify, and distribute this software for any | * Permission to use, copy, modify, and distribute this software for any | ||||
* purpose with or without fee is hereby granted, provided that the above | * purpose with or without fee is hereby granted, provided that the above | ||||
* copyright notice and this permission notice appear in all copies. | * copyright notice and this permission notice appear in all copies. | ||||
* | * | ||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||
*/ | */ | ||||
/* $OpenBSD: krl.h,v 1.6 2018/09/12 01:21:34 djm Exp $ */ | /* $OpenBSD: krl.h,v 1.7 2019/06/21 04:21:04 djm Exp $ */ | ||||
#ifndef _KRL_H | #ifndef _KRL_H | ||||
#define _KRL_H | #define _KRL_H | ||||
/* Functions to manage key revocation lists */ | /* Functions to manage key revocation lists */ | ||||
#define KRL_MAGIC "SSHKRL\n\0" | #define KRL_MAGIC "SSHKRL\n\0" | ||||
#define KRL_FORMAT_VERSION 1 | #define KRL_FORMAT_VERSION 1 | ||||
Show All 25 Lines | int ssh_krl_revoke_cert_by_serial_range(struct ssh_krl *krl, | ||||
const struct sshkey *ca_key, u_int64_t lo, u_int64_t hi); | const struct sshkey *ca_key, u_int64_t lo, u_int64_t hi); | ||||
int ssh_krl_revoke_cert_by_key_id(struct ssh_krl *krl, | int ssh_krl_revoke_cert_by_key_id(struct ssh_krl *krl, | ||||
const struct sshkey *ca_key, const char *key_id); | const struct sshkey *ca_key, const char *key_id); | ||||
int ssh_krl_revoke_key_explicit(struct ssh_krl *krl, const struct sshkey *key); | int ssh_krl_revoke_key_explicit(struct ssh_krl *krl, const struct sshkey *key); | ||||
int ssh_krl_revoke_key_sha1(struct ssh_krl *krl, const u_char *p, size_t len); | int ssh_krl_revoke_key_sha1(struct ssh_krl *krl, const u_char *p, size_t len); | ||||
int ssh_krl_revoke_key_sha256(struct ssh_krl *krl, const u_char *p, size_t len); | int ssh_krl_revoke_key_sha256(struct ssh_krl *krl, const u_char *p, size_t len); | ||||
int ssh_krl_revoke_key(struct ssh_krl *krl, const struct sshkey *key); | int ssh_krl_revoke_key(struct ssh_krl *krl, const struct sshkey *key); | ||||
int ssh_krl_to_blob(struct ssh_krl *krl, struct sshbuf *buf, | int ssh_krl_to_blob(struct ssh_krl *krl, struct sshbuf *buf, | ||||
const struct sshkey **sign_keys, u_int nsign_keys); | struct sshkey **sign_keys, u_int nsign_keys); | ||||
int ssh_krl_from_blob(struct sshbuf *buf, struct ssh_krl **krlp, | int ssh_krl_from_blob(struct sshbuf *buf, struct ssh_krl **krlp, | ||||
const struct sshkey **sign_ca_keys, size_t nsign_ca_keys); | const struct sshkey **sign_ca_keys, size_t nsign_ca_keys); | ||||
int ssh_krl_check_key(struct ssh_krl *krl, const struct sshkey *key); | int ssh_krl_check_key(struct ssh_krl *krl, const struct sshkey *key); | ||||
int ssh_krl_file_contains_key(const char *path, const struct sshkey *key); | int ssh_krl_file_contains_key(const char *path, const struct sshkey *key); | ||||
#endif /* _KRL_H */ | #endif /* _KRL_H */ | ||||