Issue Details: Openssl exe is taking the CR as part of input (password) when we 
run the exe from a java/C++ program and press enter from command line (or) 
stdIn.newLine() as shown below from JAVA.

Note: When we press "Enter" key from keyboard or stdIn.newLine()  gives the 
combination of CR+LF in case of Windows.

Openssl version used: 0.9.8o

Sample Java Code:

                String[] cmd = {cmdString, "aes-128-cbc", "-pass","stdin", 
"-md", "sha1", "-a", args};
                ...
                ProcessBuilder processBuilder = new ProcessBuilder(cmd);
...
                Process process = processBuilder.start();

                //write the password
                stdOut = process.getOutputStream();
                stdIn = new BufferedWriter(new OutputStreamWriter(stdOut));

            stdIn.write(pwd);
            stdIn.newLine();
            stdIn.write(input);
            stdIn.newLine();
            stdIn.close();

Thanks & Regards
Nagendar Gouru | [Description: cid:[email protected]]  +91 40 6687 
8122 | [Description: cid:[email protected]]  +91 9849164610
[Description: Description: C:\Program 
Files\CA\GIS\CASig\CA_email.gif]<http://www.ca.com/>



Issue Details: Openssl exe is taking the CR as part of input (password) when we run the exe from a java/C++ program and press enter from command line (or) stdIn.newLine() as shown below from JAVA.

 

Note: When we press “Enter” key from keyboard or stdIn.newLine()  gives the combination of CR+LF in case of Windows.

 

Openssl version used: 0.9.8o

 

Sample Java Code:

 

                String[] cmd = {cmdString, "aes-128-cbc", "-pass","stdin", "-md", "sha1", "-a", args};

                …     

                ProcessBuilder processBuilder = new ProcessBuilder(cmd);

                Process process = processBuilder.start();

           

                //write the password

                stdOut = process.getOutputStream();

                stdIn = new BufferedWriter(new OutputStreamWriter(stdOut));

           

            stdIn.write(pwd);

            stdIn.newLine();

            stdIn.write(input);

            stdIn.newLine();

            stdIn.close();

 

Thanks & Regards

Nagendar Gouru | Description: cid:image001.jpg@01CC0449.8D8A8150 +91 40 6687 8122 | Description: cid:image003.gif@01CC0449.8D8A8150 +91 9849164610

Description: Description: C:\Program Files\CA\GIS\CASig\CA_email.gif

 

 

<<inline: image001.jpg>>

<<inline: image002.gif>>

<<inline: image003.gif>>

Reply via email to