NAME

Net::SSL::AutoCA - Provides a automated method for locating CA bundle file/directory.

VERSION

Version 0.0.0

SYNOPSIS

use Net::SSL::AutoCA;

my $autoca = Net::SSL::AutoCA->new();

if( defined( $autoca->{CAfile} ) || defined( $autoca->{CApath} ) ){
    if( defined( $autoca->{CAfile} ) ){
        print 'CA file: '.$autoca->{CAfile}."\n";
    }

    if( defined( $autoca->{CApath} ) ){
        print 'CA path: '.$autoca->{CApath}."\n";

        #as it currently stands, this will always be true if
        #$autoca->{CApath} is defined, unless done via a
        #enviromental variable
        if( $autoca->{checkCRL} ){
            print "Check CRL\n";
        }

    }
}

METHODS

new

args hash

methods

This is the methods it should us.

The value taken is a camma seperated list. The default value is 'path,env'.

The supported values listed below

env
path

userssl

If set to 1, '~/.sslca' will be check.

This requires $ENV{USER} to be defined.

prefix

This allows adds a addiontal prefix to check instead of just '/usr' and '/usr/local'.

prefixByEnv

If set to 1, it will populate the prefix info via $ENV{'Net::SSL::AutoCA-prefix'}.

clear

This clears the selections.

my $autoca->clear;

byPath

This fetches it by the path.

args hash

userssl

If set to 1, '~/.sslca/' and '~/.sslca.bundle' will be check.

This requires $ENV{USER} to be defined.

PATH ORDER

dir

~/.sslca/
/etc/ssl/ca/
/usr/local/etc/ssl/ca/
$prefix/etc/ssl/ca/

file

~/.sslca.bundle
/etc/ssl/ca.bundle
/usr/local/etc/ssl/ca.bundle
/usr/share/certs/ca-root-nss.crt
/usr/local/share/certs/ca-root-nss.crt
$prefix/etc/ssl/ca.bundle
$prefix/share/certs/ca-root-nss.crt

my $returned=$autoca->byPath({userssl=>1});
if($returned){
    print "Nothing matched.
}

byEnv

This fetches it via a enviromental variables.

Net::LDAP::AutoCA-CAfile
Net::LDAP::AutoCA-CApath
Net::LDAP::AutoCA-checkCRL

AUTHOR

Zane C. Bowers, <vvelox at vvelox.net>

BUGS

Please report any bugs or feature requests to bug-net-ssl-autoca at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-SSL-AutoCA. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Net::SSL::AutoCA

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2009 Zane C. Bowers, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.