Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8375471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:11:11+00:00 2026-06-09T15:11:11+00:00

I’m trying to convert a P12 file to a PEM file. When I execute

  • 0

I’m trying to convert a P12 file to a PEM file. When I execute the command, the terminal asks me for three things:

P12 passphrase (I type it in, hit enter)
PEM passphrase (type it in, hit enter)
PEM passphrase confirm (type it in, hit enter)

I know I can execute a sudo command all in one shot by using the following:

echo sudopassword | sudo rm -rf /file.p12;

How can I add all three values in one shot? Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:11:12+00:00Added an answer on June 9, 2026 at 3:11 pm

    Can you explain what these P12 files are? I found this link which deals with the conversion of pkcs12 Cert/key files to .PEM format using openssl. (http://gridsite.org)

    Key to the answer is:

    Use -passin file:... and -passout file:... for unattended processing

    It’s my guess that you will have to specify the -passin file:P12passphrase and -passout file PEMpassphrase options for this case.

    This little test confirms how an input passphrase can be specified through a file:<...> parameter. This helps to hide such phrases from any over the shoulder attacks. Don’t forget to restrict access to such files. Even though it’s a common feature of most openssl commands, it’s not explicitly mentioned and it is key to the original question. The full list of options is below.

    $ openssl pkcs12 -passin file:P12phrase
    Can't open file P12phrase
    Error getting passwords
    

    (I leave it to the OP to construct the full command.)

    Below are all supported options for the pkcs12 subcommand:

    $ openssl pkcs12 help 
    Usage: pkcs12 [options]
    where options are
    -export       output PKCS12 file
    -chain        add certificate chain
    -inkey file   private key if not infile
    -certfile f   add all certs in f
    -CApath arg   - PEM format directory of CA's
    -CAfile arg   - PEM format file of CA's
    -name "name"  use name as friendly name
    -caname "nm"  use nm as CA friendly name (can be used more than once).
    -in  infile   input filename
    -out outfile  output filename
    -noout        don't output anything, just verify.
    -nomacver     don't verify MAC.
    -nocerts      don't output certificates.
    -clcerts      only output client certificates.
    -cacerts      only output CA certificates.
    -nokeys       don't output private keys.
    -info         give info about PKCS#12 structure.
    -des          encrypt private keys with DES
    -des3         encrypt private keys with triple DES (default)
    -aes128, -aes192, -aes256
                  encrypt PEM output with cbc aes
    -nodes        don't encrypt private keys
    -noiter       don't use encryption iteration
    -maciter      use MAC iteration
    -twopass      separate MAC, encryption passwords
    -descert      encrypt PKCS#12 certificates with triple DES (default RC2-40)
    -certpbe alg  specify certificate PBE algorithm (default RC2-40)
    -keypbe alg   specify private key PBE algorithm (default 3DES)
    -keyex        set MS key exchange type
    -keysig       set MS key signature type
    -password p   set import/export password source
    -passin p     input file pass phrase source
    -passout p    output file pass phrase source
    -engine e     use engine e, possibly a hardware device.
    -rand file:file:...
                  load the file (or the files in the directory) into
                  the random number generator
    -CSP name     Microsoft CSP name
    -LMK          Add local machine keyset attribute to private key
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to render a haml file in a javascript response like so:
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.