Sponsored Content
Top Forums Programming Perl to extract ssl certs from xml file Post 302774275 by MadeInGermany on Friday 1st of March 2013 01:40:10 PM
Old 03-01-2013
Please wrap your exsample in CODE tags!
Is the following what you want?
Code:
perl -ne 'print if s|^<certificate FullCert="(.*)"/>|$1|' file.xml

This User Gave Thanks to MadeInGermany For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

ssl certs

Hi all can anyone tell me how i can discover the strength of encryption in an ssl cert. I have used various methods ie apps and verisign web page but they just give me general info. I need to know the encryption level. The cert in question is used in Weblogic application for Solaris 8 any... (1 Reply)
Discussion started by: silvaman
1 Replies

2. Shell Programming and Scripting

Perl script for extract data from xml files

Hi All, Prepare a perl script for extracting data from xml file. The xml data look like as AC StartTime="1227858839" ID="88" ETime="1227858837" DSTFlag="false" Type="2" Duration="303" /> <AS StartTime="1227858849" SigPairs="119 40 98 15 100 32 128 18 131 23 70 39 123 20 120 27 100 17 136 12... (3 Replies)
Discussion started by: allways4u21
3 Replies

3. Shell Programming and Scripting

Perl script to extract 'ID' From XML File

File1.xml <?xml version.........> - <abcd:abcd_list version="1" www.john_uncle's_server.com" xmlns: - <device id="100"> <firmware>12.4(3d)</firmware> <location id="500">Sitting Room</location> </device> - <device id="101"> <firmware>12.4(3d)</firmware> <location id="501">Class... (1 Reply)
Discussion started by: sureshcisco
1 Replies

4. Programming

extract xml data and create word document using perl.

hi, i have large xml file which contains students information, i need to extract student number and some address tags and create a word document for the extracted data. my data looking llike this <student> <number>24</number> <education>bachelors</education> ... (1 Reply)
Discussion started by: veerubiji
1 Replies

5. Programming

Extract xml data and create word document using perl.

Hi, I have large xml data file.I need to extract node and some tags in the node and after I need to create word document. my XMl data is look like as below -<student> <number>24</number> <education>bachelor</bachelor> <specialization>computers</specialization> ... (3 Replies)
Discussion started by: veerubiji
3 Replies

6. Red Hat

How to Find all the SSL certs on a give host Cent OS

Hi I am trying to find all the ssl certs installed/located on cent os Host , Please help . (1 Reply)
Discussion started by: smartguyz2012
1 Replies

7. Shell Programming and Scripting

Extract a particular xml only from an xml jar file

Hi..need help on how to extract a particular xml file only from an xml jar file... thanks! (2 Replies)
Discussion started by: qwerty000
2 Replies

8. Programming

Extract Common Name (CN) of SSL certificate using perl code

Hello folks, I need a piece of code in perl which can read the file having multiple ssl certificates in text format one after the other as shown below. I need to parse this file and find out the common names of each of ssl certs it contains. E.g. -----BEGIN CERTIFICATE-----... (4 Replies)
Discussion started by: jhamaks
4 Replies

9. Shell Programming and Scripting

How to extract certs from apache ca-bundle.crt file?

Apache web server reads Certificate Authority(CA) certs from ../cert/ca-bundle.crt file for SSL authentication. It has all certs in PEM format and no way to know exactly what they are. I want to get each cert seperated by boundary strings into a file and feed it to "keytool" command to see what... (7 Replies)
Discussion started by: kchinnam
7 Replies
OPENSSL_GET_CERT_LOCATIONS(3)						 1					     OPENSSL_GET_CERT_LOCATIONS(3)

openssl_get_cert_locations - Retrieve the available certificate locations

SYNOPSIS
array openssl_get_cert_locations (void ) DESCRIPTION
openssl_get_cert_locations(3) returns an array with information about the available certificate locations that will be searched for SSL certificates. PARAMETERS
This function has no parameters. RETURN VALUES
Returns an array with the available certificate locations. EXAMPLES
Example #1 openssl_get_cert_locations(3) example <?php var_dump(openssl_get_cert_locations()); ?> The above example will output: array(8) { ["default_cert_file"]=> string(21) "/usr/lib/ssl/cert.pem" ["default_cert_file_env"]=> string(13) "SSL_CERT_FILE" ["default_cert_dir"]=> string(18) "/usr/lib/ssl/certs" ["default_cert_dir_env"]=> string(12) "SSL_CERT_DIR" ["default_private_dir"]=> string(20) "/usr/lib/ssl/private" ["default_default_cert_area"]=> string(12) "/usr/lib/ssl" ["ini_cafile"]=> string(0) "" ["ini_capath"]=> string(0) "" } PHP Documentation Group OPENSSL_GET_CERT_LOCATIONS(3)
All times are GMT -4. The time now is 05:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy