Skip to content

Commit 25be4f5

Browse files
committed
close port for openssl right after retrieving cert
1 parent d8bce06 commit 25be4f5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/tpic2/src/tpic2.erl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ cert(Key, Subject) ->
294294
]),
295295
PrivKey=tpecdsa:export(Key,pem),
296296
H ! {self(), {command, <<PrivKey/binary,"\n">>}},
297-
cert_loop(H).
297+
Res=cert_loop(H),
298+
erlang:port_close(H),
299+
Res.
298300

299301
cert_loop(Handle) ->
300302
receive

0 commit comments

Comments
 (0)