mirror of
https://github.com/ceph/ceph
synced 2024-12-17 17:05:42 +00:00
crypto: don't hash zero sized buffer
libnss returns an error and we assert in that case. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
parent
705abd9f3d
commit
7b137246b4
@ -78,9 +78,11 @@ namespace ceph {
|
||||
assert(s == SECSuccess);
|
||||
}
|
||||
void Update (const byte *input, size_t length) {
|
||||
SECStatus s;
|
||||
s = PK11_DigestOp(ctx, input, length);
|
||||
assert(s == SECSuccess);
|
||||
if (length) {
|
||||
SECStatus s;
|
||||
s = PK11_DigestOp(ctx, input, length);
|
||||
assert(s == SECSuccess);
|
||||
}
|
||||
}
|
||||
void Final (byte *digest) {
|
||||
SECStatus s;
|
||||
|
Loading…
Reference in New Issue
Block a user