package Cpanel::Easy::PHP5::Openssl;

# cpanel - Cpanel/Easy/PHP5/Openssl.pm            Copyright(c) 2011 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

our $easyconfig = {
    'name'   => 'Openssl',
    'url'    => 'http://www.php.net/manual/en/ref.openssl.php',
    'dryrun' => {
        '0' => {
            'name'    => 'Get ssl path for PHP 5',
            'command' => sub {
                my ($self) = @_;
                $self->{'__'}{'OpenSSLPath'} = $self->get_openssl_prefix( { 'skip_mach' => 1 } );
                return ( 1, 'Ok' );
            },
        },
    },
    'step' => {
        '0' => {
            'name'    => 'to config options',
            'command' => sub {
                my ($self) = @_;

                $self->add_to_configure(
                    {
                        '--with-openssl'     => $self->{'__'}{'OpenSSLPath'},
                        '--with-openssl-dir' => $self->{'__'}{'OpenSSLPath'}
                    }
                );
                return ( 1, 'Ok' );
            },

        },
    },
};

1;
