You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Andrew Stitcher (Jira)" <ji...@apache.org> on 2021/01/27 18:53:00 UTC

[jira] [Resolved] (PROTON-2329) Incorrect handling of commandline options in ssl.cpp

     [ https://issues.apache.org/jira/browse/PROTON-2329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Stitcher resolved PROTON-2329.
-------------------------------------
    Fix Version/s: proton-c-0.34.0
       Resolution: Fixed

> Incorrect handling of commandline options in ssl.cpp
> ----------------------------------------------------
>
>                 Key: PROTON-2329
>                 URL: https://issues.apache.org/jira/browse/PROTON-2329
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: examples
>            Reporter: Thomas Kettenbach
>            Priority: Minor
>             Fix For: proton-c-0.34.0
>
>
> 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
>     Hello World!
> 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.
>     ../../build/cpp/examples/ssl -j
>     unknown option -j
>      ../../build/cpp/examples/ssl -h
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org