Changeset View
Changeset View
Standalone View
Standalone View
krl.c
/* | /* | ||||
* 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.c,v 1.42 2018/09/12 01:21:34 djm Exp $ */ | /* $OpenBSD: krl.c,v 1.44 2019/09/06 04:53:27 djm Exp $ */ | ||||
#include "includes.h" | #include "includes.h" | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <openbsd-compat/sys-tree.h> | #include <openbsd-compat/sys-tree.h> | ||||
#include <openbsd-compat/sys-queue.h> | #include <openbsd-compat/sys-queue.h> | ||||
#include <errno.h> | #include <errno.h> | ||||
#include <fcntl.h> | #include <fcntl.h> | ||||
#include <limits.h> | #include <limits.h> | ||||
#include <stdlib.h> | |||||
#include <string.h> | #include <string.h> | ||||
#include <time.h> | #include <time.h> | ||||
#include <unistd.h> | #include <unistd.h> | ||||
#include "sshbuf.h" | #include "sshbuf.h" | ||||
#include "ssherr.h" | #include "ssherr.h" | ||||
#include "sshkey.h" | #include "sshkey.h" | ||||
#include "authfile.h" | #include "authfile.h" | ||||
▲ Show 20 Lines • Show All 691 Lines • ▼ Show 20 Lines | |||||
out: | out: | ||||
bitmap_free(bitmap); | bitmap_free(bitmap); | ||||
sshbuf_free(sect); | sshbuf_free(sect); | ||||
return r; | return r; | ||||
} | } | ||||
int | int | ||||
ssh_krl_to_blob(struct ssh_krl *krl, struct sshbuf *buf, | 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 r = SSH_ERR_INTERNAL_ERROR; | int r = SSH_ERR_INTERNAL_ERROR; | ||||
struct revoked_certs *rc; | struct revoked_certs *rc; | ||||
struct revoked_blob *rb; | struct revoked_blob *rb; | ||||
struct sshbuf *sect; | struct sshbuf *sect; | ||||
u_char *sblob = NULL; | u_char *sblob = NULL; | ||||
size_t slen, i; | size_t slen, i; | ||||
▲ Show 20 Lines • Show All 623 Lines • Show Last 20 Lines |