Decrypt PEM containing key and certificate (2024)

4

I have a .pem file which contains both my certificate and encrypted private key, ie:

Bag Attributes....-----BEGIN CERTIFICATE-----....-----END CERTIFICATE-----Bag Attributes....-----BEGIN ENCRYPTED PRIVATE KEY-----....-----END ENCRYPTED PRIVATE KEY-----

And I need to instead have a .pem file containing both the certificate and the decrypted private key. How can I achieve this on linux, preferrably utilising the openssl application?

Add a comment |

1 Answer

11

To decrypt a private key from a pem file you would do something like this with a subcommand (rsa, pkey, pkcs8, pkcs12):

openssl rsa -in inputfilename -out outputfilename

Your input file is different because you concatenated both keys in one file. But you can simple edit the pem file to split it in 2 files.

answered Mar 21, 2018 at 17:53

Decrypt PEM containing key and certificate (2)

bbaassssiieebbaassssiiee

1,36511 gold badge1111 silver badges1717 bronze badges

5

  • I think you need a subcommand in there. Maybe pkey? Please @ me when you fix it and I'll remove my downvote.

    Spiff

    Mar 21, 2018 at 19:51

  • Yes, it should be pkey for new format keys (PKCS8) or rsa for the older PKCS1.

    Mar 21, 2018 at 21:59

  • Added suggestion of @Spiff

    Mar 24, 2018 at 8:09

  • 2

    To do it without editing: openssl x509 <in >out; openssl pkey <in >>out

    Mar 24, 2018 at 10:04

  • Hi All, is there any updated answer for this? I have the same issue. These commands did not work for me

    iUser

    Oct 26, 2022 at 5:04

Add a comment |

Not the answer you're looking for? Browse other questions tagged

or ask your own question.

Decrypt PEM containing key and certificate (2024)
Top Articles
How To Go Viral On Instagram - 11 Strategies For Going Viral Overnight | Flock Social
HOW TO OPEN BANK ACCOUNT IN TURKEY
Ron Martin Realty Cam
Thor Majestic 23A Floor Plan
Rabbits Foot Osrs
Triumph Speed Twin 2025 e Speed Twin RS, nelle concessionarie da gennaio 2025 - News - Moto.it
Myhr North Memorial
Zachary Zulock Linkedin
Blue Ridge Now Mugshots Hendersonville Nc
Items/Tm/Hm cheats for Pokemon FireRed on GBA
My.doculivery.com/Crowncork
Walthampatch
Vcuapi
Jesus Calling Oct 27
065106619
Are They Not Beautiful Wowhead
Tamilrockers Movies 2023 Download
Fdny Business
Me Cojo A Mama Borracha
Ess.compass Associate Login
St Maries Idaho Craigslist
Lcwc 911 Live Incident List Live Status
Vrachtwagens in Nederland kopen - gebruikt en nieuw - TrucksNL
Uta Kinesiology Advising
Best Mechanics Near You - Brake Masters Auto Repair Shops
Menards Eau Claire Weekly Ad
Euro Style Scrub Caps
Ac-15 Gungeon
Routing Number For Radiant Credit Union
Bill Remini Obituary
Ontdek Pearson support voor digitaal testen en scoren
Silky Jet Water Flosser
What Is a Yurt Tent?
Used 2 Seater Go Karts
Delta Rastrear Vuelo
2016 Honda Accord Belt Diagram
Ducky Mcshweeney's Reviews
Log in or sign up to view
The best Verizon phones for 2024
Myanswers Com Abc Resources
Great Clips Virginia Center Commons
All Characters in Omega Strikers
3 Zodiac Signs Whose Wishes Come True After The Pisces Moon On September 16
Dragon Ball Super Super Hero 123Movies
'The Night Agent' Star Luciane Buchanan's Dating Life Is a Mystery
Citymd West 146Th Urgent Care - Nyc Photos
FedEx Authorized ShipCenter - Edouard Pack And Ship at Cape Coral, FL - 2301 Del Prado Blvd Ste 690 33990
Perc H965I With Rear Load Bracket
Darkglass Electronics The Exponent 500 Test
Wpne Tv Schedule
Craigslist Chautauqua Ny
Tìm x , y , z :a, \(\frac{x+z+1}{x}=\frac{z+x+2}{y}=\frac{x+y-3}{z}=\)\(\frac{1}{x+y+z}\)b, 10x = 6y và \(2x^2\)\(-\) \(...
Latest Posts
Article information

Author: Ray Christiansen

Last Updated:

Views: 6774

Rating: 4.9 / 5 (69 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Ray Christiansen

Birthday: 1998-05-04

Address: Apt. 814 34339 Sauer Islands, Hirtheville, GA 02446-8771

Phone: +337636892828

Job: Lead Hospitality Designer

Hobby: Urban exploration, Tai chi, Lockpicking, Fashion, Gunsmithing, Pottery, Geocaching

Introduction: My name is Ray Christiansen, I am a fair, good, cute, gentle, vast, glamorous, excited person who loves writing and wants to share my knowledge and understanding with you.