Posting here, in case I ever wonder how SOCKS works again.
Recently I’ve to use OS X as my computer (ofcourse temporarily ;)). I use postfix/fetchmail etc. to send/receive emails, and both of them are configured with SSL accounts. Unlike FreeBSD, or GNU/Linux distributions, OS X doesn’t ship with PEM certificate bundle which configuration of these programs expect to find. In order to get those programs going with certificates shipped with OS X, one can export all the certificates from OS X’s Keychain to a PEM file which they can then pass in the configuration.
I found this on internet somewhere I don’t remember. Posting here, in case someone else encounters similar problem.