version 1.20, 2014/12/04 01:49:59 |
version 1.21, 2014/12/21 22:27:56 |
|
|
#include "misc.h" |
#include "misc.h" |
#include "log.h" |
#include "log.h" |
#include "ssherr.h" |
#include "ssherr.h" |
|
#include "digest.h" |
|
|
#include "krl.h" |
#include "krl.h" |
|
|
|
|
int r; |
int r; |
|
|
debug3("%s: revoke type %s by sha1", __func__, sshkey_type(key)); |
debug3("%s: revoke type %s by sha1", __func__, sshkey_type(key)); |
if ((r = sshkey_fingerprint_raw(key, SSH_FP_SHA1, &blob, &len)) != 0) |
if ((r = sshkey_fingerprint_raw(key, SSH_DIGEST_SHA1, |
|
&blob, &len)) != 0) |
return r; |
return r; |
return revoke_blob(&krl->revoked_sha1s, blob, len); |
return revoke_blob(&krl->revoked_sha1s, blob, len); |
} |
} |
|
|
|
|
/* Check explicitly revoked hashes first */ |
/* Check explicitly revoked hashes first */ |
memset(&rb, 0, sizeof(rb)); |
memset(&rb, 0, sizeof(rb)); |
if ((r = sshkey_fingerprint_raw(key, SSH_FP_SHA1, |
if ((r = sshkey_fingerprint_raw(key, SSH_DIGEST_SHA1, |
&rb.blob, &rb.len)) != 0) |
&rb.blob, &rb.len)) != 0) |
return r; |
return r; |
erb = RB_FIND(revoked_blob_tree, &krl->revoked_sha1s, &rb); |
erb = RB_FIND(revoked_blob_tree, &krl->revoked_sha1s, &rb); |