Forum Discussion
Franz-Joseph_Kr
Nimbostratus
Jun 22, 2006Interfaces for ProfileClientSSL and ProfileServerSSL
Hello,
I am trying to manipulate the certificates and keys for the ProfileClientssl's and ProfileServerSSL's via set_certificate_file and set_key_file. But somehow it's not working properly. With this code I do not get any error messages, but the key-file is not updated either.
Can anybody give me a short hint??
my $sHost = shift @ARGV;
my $sPort = shift @ARGV;
my $sUID = shift @ARGV;
my $sPWD = shift @ARGV;
my $sName = shift @ARGV;
my $sKey = shift @ARGV;
my $sProtocol = "https";
SOAP::Transport::HTTP::Client::get_basic_credentials($aUID, $aPWD);
sub SOAP::Transport::HTTP::Client::get_basic_credentials
{
my $uid_ref = shift;
my $pwd_ref = shift;
return "$uid_ref" => "$pwd_ref";
}
if ( ("80" eq $sPort) or ("8080" eq $sPort) )
{
$sProtocol = "http";
}
my $ProfileCreate = SOAP::Lite
-> uri('urn:iControl:LocalLB/ProfileServerSSL')
-> proxy("$sProtocol://$sHost:$sPort/iControl/iControlPortal.cgi");
eval { $ProfileCreate->transport->http_request->header
(
'Authorization' =>
'Basic ' . MIME::Base64::encode("$sUID:$sPWD", '')
); };
---------------- idev -------
my $sFlag = "1";
my $attribute = { value => $sValue , default_flag => $sFlag };
my $soapResponse = $ProfileCreate->set_key_file(
SOAP::Data->name( profile_names => [$sName]),
SOAP::Data->name( keys => [$attribute])
);
&checkResponse($soapResponse);
print "Server SSL Profile $sName Created !\n";
SUCCESS;
}
----------------------------------------------------------------------------
checkResponse
----------------------------------------------------------------------------
sub checkResponse()
{
my ($soapResponse) = (@_);
if ( $soapResponse->fault )
{
print $soapResponse->faultcode, " ", $soapResponse->faultstring, "\n";
exit();
}
}
- The first thing that sticks out for me is that you do not set the $sValue variable to anything before using it in your $attribute structure. So, the call is being made with a value of null and flag of 1 which doesn't make much sense.
- Franz-Joseph_Kr
Nimbostratus
Hi Joe,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects