NAME
Authen::Credential::x509 - abstraction of an X.509 credential
DESCRIPTION
This helper module for Authen::Credential implements an X.509 credential, see http://en.wikipedia.org/wiki/X.509.
It supports the following attributes:
- cert
-
the path of the file holding the certificate
- key
-
the path of the file holding the private key
- pass
-
the pass-phrase protecting the private key (optional)
- ca
-
the path of the directory containing trusted certificates (optional)
It supports the following targets for the prepare() method:
- IO::Socket::SSL
-
it returns a reference to a hash containing the suitable options for IO::Socket::SSL
EXAMPLE
use Authen::Credential;
use IO::Socket::SSL;
# get the credential from somewhere
$cred = Authen::Credential->parse(...);
# use the prepare() method to get ready-to-use data
$sslopts = $cred->prepare("IO::Socket::SSL");
$socket = IO::Socket::SSL->new(
PeerHost => "web.acme.com",
PeerPort => "https",
%{ $sslopts },
);
SEE ALSO
Authen::Credential, IO::Socket::SSL, http://en.wikipedia.org/wiki/X.509.
AUTHOR
Lionel Cons http://cern.ch/lionel.cons
Copyright (C) CERN 2011-2013