AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
Expand all | Collapse all

Perl Script: enforcing TLS 1.2 in REST call

  • 1.  Perl Script: enforcing TLS 1.2 in REST call

    Posted Thu October 03, 2019 05:30 PM

    Originally posted by: james.francione@phci.org


    I have a perl script installed on AIX lpar running 7.1  that is doing a REST call to a server .  The script and the  REST call is working as designed.  I now have to enforce TLS 1.2 for that REST API call in the perl script but I do not know what I have to modify.  I have looked at the /var/ssl/openssl.cnf file  and have searched IBM docs, and websites, and have not found anything that would show me how this would be done. 

     

    Any help would be appreciated as I have been given to the end of the month 10/2019  before the server that I am sending the REST request to will stop accepting TLS 1.0 traffic.

     

    thank you

     

    Jim



  • 2.  Re: Perl Script: enforcing TLS 1.2 in REST call

    Posted Mon October 14, 2019 01:31 PM

    Originally posted by: CS5D_Jesse_Harmon


    Jim,

     

    I am not sure if you already have a solution but maybe this will help you out:

     

    https://metacpan.org/pod/REST::Client

    useragent
    An LWP::UserAgent object, ready to make http requests.

    REST::Client will provide a default for you if you do not set this.

     

    https://stackoverflow.com/questions/51110181/perl-lwp-why-does-iosocketssl-use-tls-1-0-while-netssl-uses-tls-1-2

    Changing my LWP::UserAgent instantiation solved the problem:

    my $ua = LWP::UserAgent->new(ssl_opts => {
        verify_hostname => 0,
        SSL_cipher_list => '',
    });

     

    Thanks,

    Jesse