Forum Discussion

Paul_Obereisenb's avatar
Paul_Obereisenb
Icon for Nimbostratus rankNimbostratus
Jun 23, 2006

get_certificate_list-problem

Hello,

 

I have just started with BigIP. I have allready code some scripts. But now I have a problem with Management/KeyCertificate/

 

get_certificate_list.

 

 

My code is attached.

 

Can anybody help?

 

 

Paul

 

 

$mode = "MANAGEMENT_MODE_DEFAULT";
 $soapResponse = $SSLList->get_certificate_list(
   SOAP::Data->name( mode => [$mode] ));
        &checkResponse($soapResponse);
 @ssl_list = @{$soapResponse->result};
        foreach $SSL_name (@ssl_list)
        {
         $cert_mode = $SSL_name->{"is_bundled"};
         $file_name = $SSL_name->{"file_name"};
         $cert = $SSL_name->{"certificate"};
         $cert_exp = $cert->{"expiration_date"};
         print "Expiry-Date: $cert_exp\n";
         }

 

2 Replies

  • Hello I've worked it out, so I am sorry I've bothered you.

    should be like :

    $soapResponse = $SSLList->get_certificate_list(
    SOAP::Data->name( mode => "MANAGEMENT_MODE_WEBS" ));
    &checkResponse($soapResponse);
    @ssl_list = @{$soapResponse->result};
    foreach $SSL_name (@ssl_list)
    {
             $cert_name = $SSL_name->{"file_name"};
    printf("SSL  %25s\n ", $cert_name);
     $cert_mode = $SSL_name->{"certificate"};
     $cert_misc = $cert_mode->{"expiration_string"};
    printf("Expires          %25s\n ", $cert_misc);
     $cert_misc = $cert_mode->{"version"};
    printf("Version          %25s\n ", $cert_misc);
     $cert_misc = $cert_mode->{"serial_number"};
    printf("Serial-Number    %25s\n ", $cert_misc);
    print"Subject          \n ";
     $cert_mode1 = $cert_mode->{"subject"};
     $cert_misc = $cert_mode1->{"common_name"};
    printf("Common Name      %25s\n ", $cert_misc);
     $cert_misc = $cert_mode1->{"organization_name"};
    printf("Organization     %25s\n ", $cert_misc);
     $cert_misc = $cert_mode1->{"division_name"};
    printf("Division         %25s\n ", $cert_misc);
     $cert_misc = $cert_mode1->{"locality_name"};
    printf("Locality         %25s\n ", $cert_misc);
     $cert_misc = $cert_mode1->{"state_name"};
    printf("State            %25s\n ", $cert_misc);
     $cert_misc = $cert_mode1->{"country_name"};
    printf("Country          %25s\n ", $cert_misc);
    print"Issuer           \n ";
     $cert_mode1 = $cert_mode->{"issuer"};
     $cert_misc = $cert_mode1->{"common_name"};
    printf("Common Name      %25s\n ", $cert_misc);
     $cert_misc = $cert_mode1->{"organization_name"};
    printf("Organization     %25s\n ", $cert_misc);
     $cert_misc = $cert_mode1->{"division_name"};
    printf("Division         %25s\n ", $cert_misc);
     $cert_misc = $cert_mode1->{"locality_name"};
    printf("Locality         %25s\n ", $cert_misc);
     $cert_misc = $cert_mode1->{"state_name"};
    printf("State            %25s\n ", $cert_misc);
     $cert_misc = $cert_mode1->{"country_name"};
    printf("Country          %25s\n ", $cert_misc);
    print"\n ";
    }

    šŸ˜„