mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-01 21:10:55 -05:00
Clear OpenSSL errors on SHA failures
(cherry picked from commit 247422c69f)
This commit is contained in:
parent
34a0bb146c
commit
900efd613f
1 changed files with 4 additions and 0 deletions
|
|
@ -44,18 +44,22 @@ isc_iterated_hash(unsigned char *out, const unsigned int hashalg,
|
|||
|
||||
do {
|
||||
if (SHA1_Init(&ctx) != 1) {
|
||||
ERR_clear_error();
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (SHA1_Update(&ctx, buf, len) != 1) {
|
||||
ERR_clear_error();
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (SHA1_Update(&ctx, salt, saltlength) != 1) {
|
||||
ERR_clear_error();
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (SHA1_Final(out, &ctx) != 1) {
|
||||
ERR_clear_error();
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue