I am using a Java program to call a Perl script which calls curl to upload a file to a FTPS server. The FTPS server has a certificate which requires a pass phrase. My Java program reads from standard error looking for the "Enter PEM pass phrase:" prompt so I can then write the pass phrase to stdin.
The problem is the "Enter PEM pass phrase:" prompt is not present in standard error or standard out. For example: from the Linux (Red Hat Enterprise 5.1) bash shell prompt, I call curl and redirect standard error and standard output to files. The "Enter PEM pass phrase:" prompt still appears at the console, and is not present in either of the redirect files. I am trying to understand how OpenSSL writes this prompt, especially to what stream it writes it. I believe curl is calling SSL_CTX_use_certificate_chain_file which issues the prompt, but I am not certain about that. I do see the prompt in pem_lib.c method PEM_def_callback. The prompt is written in ui_lib.c method UI_process, in the call ui->meth->ui_write_string. At this point I don't understand what happens. I am not a C programmer. My ultimate problem is how to capture the "Enter PEM pass phrase:" prompt from a Java program as described above. But my question for this list is, please explain how the "Enter PEM pass phrase:" prompt is written, including where is the code which actually writes. Thanks Robert O'Hearne ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org