version 1.469, 2023/07/14 05:31:44 |
version 1.470, 2023/07/17 04:01:10 |
|
|
if ((r = sshbuf_load_file(path, &krlbuf)) != 0) |
if ((r = sshbuf_load_file(path, &krlbuf)) != 0) |
fatal_r(r, "Unable to load KRL %s", path); |
fatal_r(r, "Unable to load KRL %s", path); |
/* XXX check sigs */ |
/* XXX check sigs */ |
if ((r = ssh_krl_from_blob(krlbuf, krlp, NULL, 0)) != 0 || |
if ((r = ssh_krl_from_blob(krlbuf, krlp)) != 0 || |
*krlp == NULL) |
*krlp == NULL) |
fatal_r(r, "Invalid KRL file %s", path); |
fatal_r(r, "Invalid KRL file %s", path); |
sshbuf_free(krlbuf); |
sshbuf_free(krlbuf); |
|
|
|
|
if ((kbuf = sshbuf_new()) == NULL) |
if ((kbuf = sshbuf_new()) == NULL) |
fatal("sshbuf_new failed"); |
fatal("sshbuf_new failed"); |
if (ssh_krl_to_blob(krl, kbuf, NULL, 0) != 0) |
if (ssh_krl_to_blob(krl, kbuf) != 0) |
fatal("Couldn't generate KRL"); |
fatal("Couldn't generate KRL"); |
if ((r = sshbuf_write_file(identity_file, kbuf)) != 0) |
if ((r = sshbuf_write_file(identity_file, kbuf)) != 0) |
fatal("write %s: %s", identity_file, strerror(errno)); |
fatal("write %s: %s", identity_file, strerror(errno)); |