Coverage Report

Created: 2025-07-18 07:03

/src/bind9/lib/isc/safe.c
Line
Count
Source
1
/*
2
 * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
3
 *
4
 * SPDX-License-Identifier: MPL-2.0
5
 *
6
 * This Source Code Form is subject to the terms of the Mozilla Public
7
 * License, v. 2.0. If a copy of the MPL was not distributed with this
8
 * file, you can obtain one at https://mozilla.org/MPL/2.0/.
9
 *
10
 * See the COPYRIGHT file distributed with this work for additional
11
 * information regarding copyright ownership.
12
 */
13
14
#include <openssl/crypto.h>
15
16
#include <isc/safe.h>
17
18
int
19
31
isc_safe_memequal(const void *s1, const void *s2, size_t len) {
20
31
  return !CRYPTO_memcmp(s1, s2, len);
21
31
}
22
23
void
24
82
isc_safe_memwipe(void *ptr, size_t len) {
25
82
  OPENSSL_cleanse(ptr, len);
26
82
}