Forum Discussion

Ian_McKenna_113's avatar
Ian_McKenna_113
Icon for Nimbostratus rankNimbostratus
Jul 12, 2006

Creating a SSL-certificate

Hallo,

 

I am trying to create a SSL-Certificate via vi certificate_generate. I think my code is ok,

 

because I am not getting any exceptions. So it might just be I am

 

using the wrong interface, do I have to create a request first??

 

I am a bit lost on this subject.

 

 

Ian

 

 

 

my $sProtocol = "https";

 

my $SSL_name;

 

 

if ( ("80" eq $sPort) or ("8080" eq $sPort) )

 

{

 

$sProtocol = "http";

 

}

 

 

my $SSLList = SOAP::Lite

 

-> uri('urn:iControl:Management/KeyCertificate')

 

-> proxy("$sProtocol://$sHost:$sPort/iControl/iControlPortal.cgi");

 

eval { $SSLList->transport->http_request->header

 

(

 

'Authorization' =>

 

'Basic ' . MIME::Base64::encode("$sUID:$sPWD", '')

 

); };

 

 

 

my $soapResponse = $SSLList->certificate_generate(

 

SOAP::Data->name( mode => "MANAGEMENT_MODE_WEBS" ),

 

SOAP::Data->name( certs => id => "test", email => "email"),

 

SOAP::Data->name( x509_data => common_name => "test", country_name => "USA", state_name => "Virginia", locality_name => "Creek", organization_name => "BMW", division_name => "Webdivision" ),

 

SOAP::Data->name( lifetime_days => 12 ),

 

SOAP::Data->name( overwrite => "0" ),

 

);

 

&checkResponse($soapResponse);

 

------------ idev -----------------------

 

 

}

 

sub checkResponse()

 

{

 

my ($soapResponse) = (@_);

 

if ( $soapResponse->fault )

 

{

 

print $soapResponse->faultcode, " ", $soapResponse->faultstring, "\n";

 

exit();

 

}

 

}
No RepliesBe the first to reply