provide compatibility for libradius

This commit is contained in:
christos 2018-02-05 00:42:46 +00:00
parent b400d00712
commit 5097134740

View File

@ -102,6 +102,24 @@ int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
static inline HMAC_CTX *HMAC_CTX_new(void)
{
HMAC_CTX *ctx = malloc(sizeof(*ctx));
if (ctx == NULL)
return NULL;
HMAC_CTX_init(ctx);
return ctx;
}
static inline void HMAC_CTX_free(HMAC_CTX *ctx)
{
if (ctx == NULL)
return;
HMAC_CTX_cleanup(ctx);
free(ctx);
}
#ifdef __cplusplus
}
#endif