Professional Web Applications Themes

how to retrieve private key from .pfx file? - ASP.NET Security

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

Sponsored Links
  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!


    Sponsored Links
    Schoolar Guest

  2. #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

  3. #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

Similar Threads

  1. how to retrieve swf file from database?
    By tp010383 in forum Macromedia Flash Data Integration
    Replies: 2
    Last Post: October 14th, 03:50 PM
  2. Private key file name and/or location
    By keithwade@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 0
    Last Post: April 29th, 03:04 AM
  3. How to retrieve the records if I have .SQL script file using ADO.net
    By Kiran in forum ASP.NET Data Grid Control
    Replies: 4
    Last Post: October 14th, 08:38 PM
  4. Replies: 0
    Last Post: July 31st, 07:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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