2014-07-29 15:20 GMT+04:00  <ma...@apache.org>:
> Author: markt
> Date: Tue Jul 29 11:20:42 2014
> New Revision: 1614310
>
> URL: http://svn.apache.org/r1614310
> Log:
> Start to add some tests for the OpenSSL to JSSE mapping.
> This test currently fails so it is commented out while I work my way through 
> the failures.
>
> Added:
>     tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/
>     tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestCipher.java 
>   (with props)
>
> Added: 
> tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestCipher.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestCipher.java?rev=1614310&view=auto
> ==============================================================================
> --- tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestCipher.java 
> (added)
> +++ tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestCipher.java 
> Tue Jul 29 11:20:42 2014
> (...)
> +    private static String getOpenSSLCiphersAsExpression(String 
> specification) throws Exception {
> +        // TODO The path to OpenSSL needs to be made configurable
> +        StringBuilder cmd = new StringBuilder("/opt/local/bin/openssl 
> ciphers");

BTW, I think on Windows we may put the openssl executable into
bin/native/ like we do with tcnative-1.dll when running the tests with
APR connector.

(I though that maybe we can to limit the the test to be executed only
when testing the APR connector, but Gump and Buildbot are not testing
APR. So the idea is not a good one).


> +        if (specification != null) {
> +            cmd.append(' ');
> +            cmd.append(specification);
> +        }
> +        Process process = Runtime.getRuntime().exec(cmd.toString());

It is better to use Runtime.exec(String[]) or use java.lang.ProcessBuilder.

IIRC, exec(String) has ambiguities in parsing the string.
There are "Changes to Runtime.exec" sections in Release notes for Java
7u21 and 7u25. [1][2]

[1] 
http://www.oracle.com/technetwork/java/javase/7u21-relnotes-1932873.html#jruntime
[2] 
http://www.oracle.com/technetwork/java/javase/7u25-relnotes-1955741.html#jruntime

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to