Forum Discussion

Anthony_Gerace_'s avatar
Anthony_Gerace_
Historic F5 Account
Aug 30, 2006

Unable to set key and cert files in create clientssl profile

Hi All,

I am attempting to create an ssl client profile. When my script runs it creates the profile, but doesn't change the key and cert files. I do not get any exception and am perplexed as to why I'm only getting it to work part way. Has anyone else had a similar problem? Suggestions?

Thanks,

Anthony

!/usr/bin/perl
 Include modules
use SOAP::Lite  + trace => qw(method debug);
use locale;
use iControlTypeCast;
 Revision history
-------------------------------------------------------------------------------
 Global Variables
-------------------------------------------------------------------------------
$corpID = "admin";
$corpPass = "99High";
$host = "10.201.64.124";
-------------------------------------------------------------------------------
 Constants
-------------------------------------------------------------------------------
$common_name = "ajgtest.test.com";
$k  = {value => "ajgtest.test.com.key" , default_flag => false };
$c = { value => "ajgtest.test.com.crt" , default_flag => false };
-------------------------------------------------------------------------------
 Main
-------------------------------------------------------------------------------
$sslProfile = SOAP::Lite
    -> uri('urn:iControl:LocalLB/ProfileClientSSL')
    -> proxy("https://$host/iControl/iControlPortal.cgi");
push @key, $k;
push @cert, $c;
$soap_response = $sslProfile->create(SOAP::Data->name(profile_names => [$common_name]),
      SOAP::Data->name(keys => [@key]), SOAP::Data->name(certs => [@cert]) );
if ($soap_response->fault) {
    $errmsg = $soap_response->faultstring ."\n";
      print $errmsg;
}
-----------------------------------------------------------------------
 Transport Information
-----------------------------------------------------------------------
sub SOAP::Transport::HTTP::Client::get_basic_credentials
{
        return "$corpID" => "$corpPass";
}
  • Try replacing the boolean default_flag values from 'false' to 0.

    $k  = {value => "ajgtest.test.com.key" , default_flag => 0 };
    $c = { value => "ajgtest.test.com.crt" , default_flag => 0 };

    I'm not sure if perl will interpret the false value correctly in converting to a 0 or 1 on the wire.

    -Joe