Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Using Certificate files in Perl

by shug94 (Sexton)
on Oct 19, 2009 at 00:51 UTC ( #801915=perlquestion: print w/ replies, xml ) Need Help??
shug94 has asked for the wisdom of the Perl Monks concerning the following question:

I have a certificate file which was generated by the simpleCA tool. I want to know what the easiest way is to use this certificate file to sign some data in Perl.

I am running an Apache HTTP Server on a Centos box, and I need to digitally sign some text.

I read in the file (Client.crt), and output it to standard output. It appears to be Base64Encoded. Here is a sample:

Is there a Perl module which will read in this certificate file and allow me to use it to sign data?


Comment on Using Certificate files in Perl
Download Code
Re: Using Certificate files in Perl
by Anonymous Monk on Oct 19, 2009 at 02:48 UTC
      I clearly didn't ask my question well enough.

      I will probably be wanting to sign it using Crypt::RSA, but what I really need to know is how to retrieve the public and private keys from the certificate file. Although I suppose this is not really a perl question, and is more of a simpleCA question. I will try elsewhere on the net.

      I have now read the file further using the decode function of MIME::Base64, and it seems to contain some plaintext and a lot of binary. Now all I need is to understand the format.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://801915]
Approved by ww
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2015-01-31 13:35 GMT
Find Nodes?
    Voting Booth?

    My top resolution in 2015 is:

    Results (258 votes), past polls