LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-02-2021, 08:10 AM   #1
1s440
Member
 
Registered: Mar 2018
Posts: 266

Rep: Reputation: Disabled
chainloss during conversion


Hi all,

when i convert from fullchain.crt to fullchain.pem somehow the chain is getting lost.

My fullchain.crt contains

Code:
-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----

the command which i used
Code:
openssl x509 -in fullchain.crt -out fullchain.pem
 
Old 03-02-2021, 08:38 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,688

Rep: Reputation: Disabled
The openssl x509 command converts single certificates, not certificate bundles. In how you used it, the file fullchain.pem would contain only the first certificate from fullchain.crt.

You can split fullchain.crt into individual certificates with csplit:
Code:
csplit -zf'ca-cert' -b'%02d.pem' fullchain.crt '/^-----END/+1' '{*}'
 
Old 03-03-2021, 12:11 AM   #3
1s440
Member
 
Registered: Mar 2018
Posts: 266

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
The openssl x509 command converts single certificates, not certificate bundles. In how you used it, the file fullchain.pem would contain only the first certificate from fullchain.crt.

You can split fullchain.crt into individual certificates with csplit:
Code:
csplit -zf'ca-cert' -b'%02d.pem' fullchain.crt '/^-----END/+1' '{*}'
i have done splitting and combined it again. Thanks

Last edited by 1s440; 03-03-2021 at 12:59 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB Error During Debian VM Conversion khan.zaib Debian 11 02-12-2019 12:27 AM
MQ LINUX vs MQ Unix Conversion Differences - LINUX Conversion Issues catch93 Linux - Newbie 4 11-03-2011 09:10 PM
VMWare Converter & Debian - lost eth0 & LVM during conversion Ladowny Linux - Virtualization and Cloud 1 04-05-2010 01:47 PM
Keeping Logical Volume during conversion from Fedora to RHEL 5.2 pat_allen Linux - Server 1 11-10-2008 03:44 PM
Several Gnome Packages wont install during setup, stall's during boot Arcticfox Slackware 3 12-10-2003 11:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration