GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::SSL::EXPIREDATE (3)

.ds Aq ’

NAME

Net::SSL::ExpireDate - obtain expiration date of certificate

CONTENTS

SYNOPSIS



    use Net::SSL::ExpireDate;

    $ed = Net::SSL::ExpireDate->new( https => example.com );
    $ed = Net::SSL::ExpireDate->new( https => example.com:10443 );
    $ed = Net::SSL::ExpireDate->new( ssl   => example.com:465 ); # smtps
    $ed = Net::SSL::ExpireDate->new( ssl   => example.com:995 ); # pop3s
    $ed = Net::SSL::ExpireDate->new( file  => /etc/ssl/cert.pem );

    if (defined $ed->expire_date) {
      # do something
      $expire_date = $ed->expire_date;         # return DateTime instance

      $expired = $ed->is_expired;              # examine already expired

      $expired = $ed->is_expired(2 months);  # will expire after 2 months
      $expired = $ed->is_expired(DateTime::Duration->new(months=>2));  # ditto
    }



DESCRIPTION

Net::SSL::ExpireDate get certificate from network (SSL) or local file and obtain its expiration date.

METHODS

    new



  $ed = Net::SSL::ExpireDate->new( %option )



This method constructs a new Net::SSL::ExpireDate instance and returns it. %option is to specify certificate.



  KEY    VALUE
  ----------------------------
  ssl    "hostname[:port]"
  https  (same as above ssl)
  file   "path/to/certificate"



    expire_date



  $expire_date = $ed->expire_date;



Return expiration date by DateTime instance.

    begin_date



  $begin_date  = $ed->begin_date;



Return beginning date by DateTime instance.

    not_after

Synonym for expire_date.

    not_before

Synonym for begin_date.

    is_expired



  $expired = $ed->is_expired;



Obtain already expired or not.

You can specify interval to obtain will expire on the future time. Acceptable intervals are human readable string (parsed by Time::Duration::Parse) and DateTime::Duration instance.



  # will expire after 2 months
  $expired = $ed->is_expired(2 months);
  $expired = $ed->is_expired(DateTime::Duration->new(months=>2));



    type

return type of examinee certificate. ssl or file.

    target

return hostname or path of examinee certificate.

BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to bug-net-ssl-expiredate@rt.cpan.org, or through the web interface at <http://rt.cpan.org>.

AUTHOR

HIROSE Masaaki <hirose31 _at_ gmail.com>

REPOSITORY

<http://github.com/hirose31/net-ssl-expiredate>



  git clone git://github.com/hirose31/net-ssl-expiredate.git



patches and collaborators are welcome.

SEE ALSO

COPYRIGHT & LICENSE

Copyright HIROSE Masaaki

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

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::SSL::EXPIREDATE (3) 2016-01-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.