Skip to content

Commit

Permalink
Remove duplicate function
Browse files Browse the repository at this point in the history
  • Loading branch information
devicenull committed Jan 17, 2024
1 parent 47aacbb commit 515fe65
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/ngx_http_lua_ssl_certby.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,35 +1308,6 @@ ngx_http_lua_ffi_parse_der_priv_key(const char *data, size_t len,
}


void *
ngx_http_lua_ffi_parse_der_priv_key(const char *data, size_t len,
char **err)
{
BIO *bio = NULL;
EVP_PKEY *pkey = NULL;

bio = BIO_new_mem_buf((char *) data, len);
if (bio == NULL) {
*err = "BIO_new_mem_buf() failed";
BIO_free(bio);
ERR_clear_error();
return NULL;
}

pkey = d2i_PrivateKey_bio(bio, NULL);
if (pkey == NULL) {
*err = "d2i_PrivateKey_bio() failed";
BIO_free(bio);
ERR_clear_error();
return NULL;
}

BIO_free(bio);

return pkey;
}


void
ngx_http_lua_ffi_free_priv_key(void *cdata)
{
Expand Down

0 comments on commit 515fe65

Please sign in to comment.