Skip to content

Commit 2bac24a

Browse files
committed
pkey.getPrivateKey: use password callback
1 parent 3e74c71 commit 2bac24a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3969,7 +3969,7 @@ static int pk_getPrivateKey(lua_State *L) {
39693969
return luaL_error(L, "pkey:getPrivateKey: unknown cipher: %s", cname);
39703970
}
39713971

3972-
if (!PEM_write_bio_PrivateKey(getbio(L), key, cipher, pass, pass ? strlen(pass) : 0, 0, 0))
3972+
if (!PEM_write_bio_PrivateKey(getbio(L), key, cipher, NULL, 0, pem_pw_cb, pass))
39733973
return auxL_error(L, auxL_EOPENSSL, "pkey:getPrivateKey");
39743974
pushbiostring(L);
39753975
return 1;

0 commit comments

Comments
 (0)