I have made a patch for pine-4.10 to work with OpenSSL-0.9.3a. It works fine for Linux (glibc), HPUX-10 and HPUX-11 - others not tested, yet.
If pine is configured to make a connection to an imap server, it will first try to connect via SSL to port 993 (imaps) of the server. If this SSL connection fails the 'normal' uncrypted connection will be tried.
Compile and install OpenSSL-0.9.3a
Set the OPENSSLDIR if you have not installed in /usr/local/ssl (default)
Extract the pine4.10 source
Apply the patch:
go into the pine directory and type 'patch -p1 < ../pine4.10-ssl.diff'
build lxs (for Linux)
build hps (for HPUX)