Yes.  Absolutely correct. I should have done this.

Please include the following three lines to close the three ports created by the (process..) call.

(close-input-port (first res))
(close-output-port (second res))
(close-input-port (fourth res))




R./
Zack

On Tue, Apr 24, 2012 at 1:21 PM, Robby Findler wrote:

One comment here: you really want to be sure that you close all three
of the ports that process returns, or else you'll run into problems if
you use this in a larger context.

Robby

On Tue, Apr 24, 2012 at 12:14 PM, Galler <lzgal...@optonline.net> wrote:


Neil V. mentioned his preference for directly calling the OpenSSL
libraries vs. using  mzcrypto (planet vyzo/crypto)

I wanted to provide a small example using this technique for
generating and retrieving a 1024 bit unencrypted private key in
PEM format.

(define res (process "openssl genrsa 1024"))

(port->string (first res))

;;returns
"-----BEGIN RSA PRIVATE KEY-----
......[the key].....
-----END RSA PRIVATE KEY-----\n"



____________________
 Racket Users list:
 http://lists.racket-lang.org/users

____________________
 Racket Users list:
 http://lists.racket-lang.org/users

Reply via email to