From af9bb46a78ade06dbff819a730ef3245acd9572d Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Sun, 16 Aug 2020 16:58:51 -0500 Subject: [PATCH] hx509: Add hx509_enomem() --- lib/hx509/error.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/hx509/error.c b/lib/hx509/error.c index 55c695821..d3ebd1bf6 100644 --- a/lib/hx509/error.c +++ b/lib/hx509/error.c @@ -119,6 +119,20 @@ hx509_set_error_string(hx509_context context, int flags, int code, va_end(ap); } +/** + * Sets ENOMEM as the error on a hx509 context. + * + * @param context A hx509 context. + * + * @ingroup hx509_error + */ + +HX509_LIB_FUNCTION int HX509_LIB_CALL +hx509_enomem(hx509_context context) +{ + return heim_enomem(context->hcontext); +} + /** * Get an error string from context associated with error_code. *