Register
It is currently Sat Nov 22, 2014 2:52 am

Identify duplicates in cert bundle


All times are UTC - 6 hours


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 PostPosted: Sat Jun 28, 2014 4:01 pm   

Joined: Sat Jun 28, 2014 3:59 pm
Posts: 2
I do have a big CA bundle certificate file and each time if i get request to add new certificate to the existing bundle i need to make sure it is not present already. How i can validate the duplicates.

The alignment of the certificate within the bundle seems to be different.

Example:
Cert 1
Code:
MIIF7DCCBNSgAwIBAgIQbsx6pacDIAm4zrz06VLUkTANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE
BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO


Cert 2
Code:
MIIF7DCCBNSgAwIBAgIQbsx6pacDIAm4zrz06VLUkTANBgkqhkiG9w0BAQUFADCB
yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL



These are duplicates and since they are aligned differently i could not do an extract and compare.

Your suggestions and inputs are most welcome.


Top
 Profile  
 PostPosted: Sat Jun 28, 2014 5:18 pm   

Joined: Mon Mar 02, 2009 3:03 am
Posts: 567
hi,

unfortunately, imho, it's not a shell question.
this relates to the software your using.


Top
 Profile  
 PostPosted: Sat Jun 28, 2014 8:04 pm   

Joined: Sat Jun 28, 2014 3:59 pm
Posts: 2
Thank you Watael. I was looking for a shell command or a method which would be helpful in identifying these duplicates. If this thread is posted a wrong category can you please close this thread or move it to the right group.


Top
 Profile  
 PostPosted: Tue Jul 01, 2014 5:17 am   
Moderator
User avatar

Joined: Thu Oct 11, 2007 7:12 am
Posts: 229
Location: London - UK
There needs to be a way of identifying the start and end of each certificate, then return characters can be stripped and the results compared.
A variable can be manipulated to remove return characters like so;
Code:
wibble='abc\ndef\n'
changedwibble=${wibble/\n/}


I hope this gives some clues for you :)

DW


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP