Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: IPC::Run command is correctly constructed but does not have effect

by byrnejb (Initiate)
on Oct 25, 2016 at 18:31 UTC ( [id://1174721]=note: print w/replies, xml ) Need Help??


in reply to IPC::Run command is correctly constructed but does not have effect

I have this pinned down to this line:
422 $args->{keypass} = "'" . $self->getPassword("Private key passwor +d",1) . "'"

If the "'" concatenations are removed and a pass phrase without spaces is entered then the openssl commands execute from the script. If spaces are used then the command fails. If the password input is escaped with ' ' then the command simply does not execute from the script but does from the command line.

How do I allow private key pass-phrases to contain blanks and still get the script to operate?

  • Comment on Re: IPC::Run command is correctly constructed but does not have effect
  • Download Code

Replies are listed 'Best First'.
Re^2: IPC::Run command is correctly constructed but does not have effect
by Corion (Patriarch) on Oct 25, 2016 at 18:36 UTC

    Whatever is building the command line is doing it wrong:

    -passin pass:'test me'

    ... should likely be

    -passin 'pass:test me'

    For example, the following line building some command line will also not deal well with spaces in your password:

    $cmd = "-des3 -passout pass:$args->{keypass} ".$cmd if defined($args-> +{keypass});

    Also, this line:

    my $common_args = "-$args->{digest} -days $args->{days} ". " -key $cakey -passin pass:$args->{keypass}";

    As a general rule, if it doesn't work on the command line/shell prompt, there is very little that IPC::Run can do to make it work either.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1174721]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-25 16:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found