how to retrieve private key from .pfx file?

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default how to retrieve private key from .pfx file?

    X509Certificate can retrieve public key from .cer file.
    But how to retrieve private key from .pfx file?
    Thanks!


    Schoolar Guest

  2. Similar Questions and Discussions

    1. How do I retrieve the list of customproperties contained in a PDF file?
      Hello. How do I retrieve the list of custom properties contained in a PDF file? In a related topic: is there an intrinsic difference between...
    2. how to retrieve swf file from database?
      i m still new in this actionscript thingy. i know how to load external .swf file from the same folder to flash when it is call by using ...
    3. Private key file name and/or location
      Had to reformat hard disk and reinstall software after messy crash. Selectively restoring from backup media. I'm running XP home edition and Adobe...
    4. How to retrieve the records if I have .SQL script file using ADO.net
      Hi, I need to retrieve records from SQL 2000 datbase using ADO.Net I have a huge select statement in .sql script file I need to run it to get the...
    5. Private Fotopages - private Web Galleries WANTED!
      Hello NG I am still seeking links to private (hobby / non professional/ amateur) fotopages in Australia -or any other Country to be used at...
  3. #2

    Cool Re: how to retrieve private key from .pfx file?

    Use open ssl or cert util tools to extract the private key from the pfx.

    command in open ssl : pkcs12 -nocerts -in "Pfx file name &location"(e.g "C:\KarthikTest.pfx" -out "Strore location " (e.g "c:\KarthikPvatekey.key"


    Thanks

    Karthik
    Karthik Guest

  4. #3

    Post How to retrieve private key from .pfx file?

    If you want to extract private key from a pfx file and write it to PEM file
    >>openssl.exe pkcs12 -in publicAndprivate.pfx -nocerts -out privateKey.pem
    If you want to extract the certificate file (the signed public key) from the pfx file
    >>openssl.exe pkcs12 -in publicAndprivate.pfx -clcerts -nokeys -out publicCert.pem
    To remove the password from the private key file.
    >> openssl.exe rsa -in privateKey.pem -out private.pem
    This is required as, at the time of exporting privateKey, you have added a password to the private key to secure it. If you left the password with it, it will keep asking the password as any application tries to access it.
    Unregistered Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139