How to pass more than one argument using Process + OpenSSL

1

Using the following code I pass a certain argument, then I need to pass a password that OpenSSL requests, but how do I do this? I tried StandardInput but got an exception:

  

Additional information: StandardIn was not redirected

 Dim procAssin As New Process()
    With procAssin.StartInfo
        .UseShellExecute = False
        .RedirectStandardOutput = True
        .RedirectStandardError = True
        .StandardOutputEncoding = Encoding.GetEncoding("Windows-1252")

        .FileName = "C:\OpenSSL\openssl.exe"

        .WorkingDirectory = "C:\certificado\bin"

        .Arguments = "pkcs12 -in C:\Cert\certificado.pfx -out C:\Cert\certificado.pem -nodes"

    End With

    procAssin.Start()

  procAssin.StandardInput.WriteLine("SENHA")
    
asked by anonymous 16.10.2015 / 17:20

1 answer

1

Turning on this property resolves:

myProcess.StartInfo.RedirectStandardInput = true;
    
16.10.2015 / 17:49