Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Please enter Certificate: Press <Enter> when done -----BEGIN CERTIFICATE----- MIIFtjCCBJ6gAwIBAgIQIFUz8E8mut6Vrn5LtX6fujANBgkqhkiG9w0BAQUFADBi IPFnu2NdIr8HG9qX9exCghK4VUD7Dk6CdCY= -----END CERTIFICATE----- Please enter Private Key: Press <Enter> when done -----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAKCAQEAyyRe6tHM1zq+rZk8DSX9ej1u17sCVydi6ijkzdYTTUth6fmN -----END CERTIFICATE----- Please enter certificates of Certification Authorities (CA) which form + the certificate chain of the server certificate. This starts with the issu +ing CA certificate of the server certificate and can range up to the root CA certificate. Do you want to continue entering root and/or intermediate certificates {y|n}: y Please enter Intermediate Certificate: Press <Enter> when done -----BEGIN CERTIFICATE----- MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU -----END CERTIFICATE----- Do you want to continue entering root and/or intermediate certificates {y|n}: y Please enter Intermediate Certificate: Press <Enter> when done -----BEGIN CERTIFICATE----- ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF -----END CERTIFICATE----- Do you want to continue entering root and/or intermediate certificates {y|n}: n
Code used : my $certificate = $opts{certificate}; my $private_key = $opts{'private-key'}; my $intermediate_key = $opts{'intermediate-key'}; $prompt_answers = [ 'Please enter Certificate:.*' => $certificate, 'Please enter Private Key:.*' => $private_key, 'Please enter certificates of Certification Authorities.*' + => ( defined $intermediate_key ) ? $intermediate_key : 'n +', ]; This code was effective till the response passed was 'n' for prompt 'D +o you want to continue entering root and/or intermediate certificates +', but not effective if the intermediate certificate chain is provide +d.
The no. of 'intermediate certificates' prompt may vary depending upon the no of 'intermediate certificates' passed. I want to handle this intermediate certificate chain scenario.

In reply to Iterated prompt handling by vaibhav07

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (9)
    As of 2014-09-01 08:39 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (299 votes), past polls