const EVP_MD *evp = NULL;
EVP_MD_CTX *evp_md_ctx;
enum jwt_vrfy_status retval = JWT_VRFY_KO;
- struct buffer *trash = NULL;
struct ebmb_node *eb;
struct jwt_cert_tree_entry *entry = NULL;
- trash = alloc_trash_chunk();
- if (!trash)
- return JWT_VRFY_OUT_OF_MEMORY;
-
switch(ctx->alg) {
case JWS_ALG_RS256:
case JWS_ALG_ES256:
}
evp_md_ctx = EVP_MD_CTX_new();
- if (!evp_md_ctx) {
- free_trash_chunk(trash);
+ if (!evp_md_ctx)
return JWT_VRFY_OUT_OF_MEMORY;
- }
eb = ebst_lookup(&jwt_cert_tree, ctx->key);
end:
EVP_MD_CTX_free(evp_md_ctx);
- free_trash_chunk(trash);
return retval;
}