Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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?


Replies are listed 'Best First'.
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2017-10-22 01:51 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (271 votes). Check out past polls.