I've prepared the following PR for this: https://github.com/apache/qpid-proton/pull/291
This Jira Ticket shall provide background infos, concerning this.
The ssl.cpp example handles command line arguments in an incorrect way.
The argument passed to '-c' options must not end with '/' (as some shells automatically append when pressing <tab> to expand the directory name), else it will fall back to 'ssl-certs/'
Below I'm assuming build artefacts in 'build/' subdirectory, eg.
mkdir build && cd build && cmake .. && make && cd ../cpp/examples
Examples of the wrong behariour
$ ../../build/cpp/examples/ssl -c newdir/
Inbound server connection connected via SSL. Protocol: TLSv1/SSLv3
Outgoing client connection connected via SSL. Server certificate identity CN=test_server
Expected behaviour would be to pick 'tserver','tclient' certificate files from directory 'newdir'
I don't provide correct files in the 'newdir', just to demonstrate, that the certificate files would be looked up in the 'newdir', so when omitting '/', the correct directory is picked:
$ ../../build/cpp/examples/ssl -c newdir
SSL certificate initialization failure for newdir/tserver-certificate.pem:newdir/tserver-private-key.pem:tserverpw
Also, when passing an unknown command line option, the usage should be printed.
unknown option -j