#!/usr/bin/env perl

# TODO: when non-interactive, the default is used, e.g. c=AU, ST=Some-State,
# etc.

use 5.010001;
use strict;
use warnings;
BEGIN { no warnings; $main::Log_Level = "info" }

use App::CreateSelfSignedSSL;
use Perinci::CmdLine;

our $VERSION = '0.02'; # VERSION

Perinci::CmdLine->new(
    url => '/App/CreateSelfSignedSSL/create_self_signed_ssl_cert')->run;

#ABSTRACT: Create self-signed SSL certificate
#PODNAME: create-self-signed-ssl-cert

__END__

=pod

=encoding UTF-8

=head1 NAME

create-self-signed-ssl-cert - Create self-signed SSL certificate

=head1 VERSION

version 0.02

=head1 SYNOPSIS

 # on success, will create example.com.pem
 % create-self-signed-ssl-cert example.com

 # Add --trace or TRACE=1 to see everything (including executed commands)
 % create-self-signed-ssl-cert example.com --trace
 % TRACE=1 create-self-signed-ssl-cert example.com

 # see more options
 % create-self-signed-ssl-cert --help

=head1 DESCRIPTION

This script simplifies creating self-signed SSL certificate. It executes the
L<openssl> command-line program and uses L<Expect> to supply defaults so the
script can be run non-interactively. You can just specify the hostname and it
will create I<hostname>.pem file for you.

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/App-CreateSelfSignedSSL>.

=head1 SOURCE

Source repository is at L<https://github.com/sharyanto/perl-App-CreateSelfSignedSSL>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-CreateSelfSignedSSL>

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

=head1 AUTHOR

Steven Haryanto <stevenharyanto@gmail.com>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Steven Haryanto.

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

=cut
