Skip to content

Commit

Permalink
pkey.getPrivateKey: use password callback
Browse files Browse the repository at this point in the history
  • Loading branch information
kunkku committed Jul 26, 2018
1 parent a97094e commit a1bbc97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4130,7 +4130,7 @@ static int pk_getPrivateKey(lua_State *L) {
char *str;
long len;

if (!PEM_write_bio_PrivateKey(bio, key, cipher, pass, pass ? strlen(pass) : 0, 0, 0))
if (!PEM_write_bio_PrivateKey(bio, key, cipher, NULL, 0, pem_pw_cb, pass))
return auxL_error(L, auxL_EOPENSSL, "pkey:getPrivateKey");
len = BIO_get_mem_data(bio, &str);
lua_pushlstring(L, str, len);
Expand Down

0 comments on commit a1bbc97

Please sign in to comment.