Sam Wong > Net-AS2-0.02 > Net::AS2::FAQ

Download:
Net-AS2-0.02.tar.gz

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

Net::AS2::FAQ - Documents about Net::AS2 that does not fit the main document

Preparing Certificates ^

Keys and certificates in PEM forms are expected in Net::AS2.

These could be prepared with the OpenSSL toolchain as follows:

Generating private key
    openssl genrsa -out my.key 1024

Please keep the key ONLY to yourself.

The content could be used in the constructor.

Generating self-signed certificate

With this copy of openssl.conf,

    openssl req -config openssl.conf -new -x509 -days 3650 -key my.key -out my.cert

Exchange the certificate with the communication partner.

The content could be used in the constructor.

Decoding .p12/.pfx certificate

In case you have generated a PKCS #12 key/certificate somewhere, you could split them into key and certificate in PEM format with the following.

    openssl pkcs12 -in my.pfx -nodes
DER format to PEM format

If the certificate file is in binary format, most likely it is in the DER format. Convert it into the PEM format with the following.

    openssl x509 -inform DER -outform PEM -in my.der.cert -out my.pem.cert

Ditto for keys

    openssl rsa -inform DER -outform PEM -in my.der.key -out my.pem.key

SEE ALSO ^

Net::AS2

syntax highlighting: