mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Merge branch '1672-stop-leaking-external-headers-and-symbols-to-the-public-api-isc/hmac.h' into 'master'
Make isc_hmac API to not leak OpenSSL symbols See merge request isc-projects/bind9!3216
This commit is contained in:
@@ -25,9 +25,9 @@
|
||||
|
||||
isc_hmac_t *
|
||||
isc_hmac_new(void) {
|
||||
isc_hmac_t *hmac = HMAC_CTX_new();
|
||||
HMAC_CTX *hmac = HMAC_CTX_new();
|
||||
RUNTIME_CHECK(hmac != NULL);
|
||||
return (hmac);
|
||||
return ((struct hmac *)hmac);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -120,10 +120,8 @@ isc_result_t
|
||||
isc_hmac(isc_md_type_t type, const void *key, const int keylen,
|
||||
const unsigned char *buf, const size_t len, unsigned char *digest,
|
||||
unsigned int *digestlen) {
|
||||
isc_hmac_t *hmac = NULL;
|
||||
isc_result_t res;
|
||||
|
||||
hmac = isc_hmac_new();
|
||||
isc_hmac_t *hmac = isc_hmac_new();
|
||||
|
||||
res = isc_hmac_init(hmac, key, keylen, type);
|
||||
if (res != ISC_R_SUCCESS) {
|
||||
|
@@ -22,9 +22,7 @@
|
||||
#include <isc/result.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <openssl/hmac.h>
|
||||
|
||||
typedef HMAC_CTX isc_hmac_t;
|
||||
typedef void isc_hmac_t;
|
||||
|
||||
/**
|
||||
* isc_hmac:
|
||||
|
Reference in New Issue
Block a user