Ignore:
Timestamp:
03/31/10 13:05:14 (14 years ago)
Author:
rafaelraymundo
Message:

Ticket #1021 - Corrigida rotina de obtenção da url da crl no certificado digital

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/security/classes/funcoes_auxiliares.php

    r1574 r2394  
    13541354 
    13551355                                case 0xa0: 
     1356                                case 0xa4: 
    13561357                                        // Extensions 
    13571358                                        $len = ord($data[1]); 
     
    16081609        { 
    16091610                $AUX = recupera_dados_oid($certificado_digital_formato_der,'2.5.29.31'); 
     1611                echo '<br/><br/><br/><pre>'; 
     1612                print_r($AUX); 
     1613                echo '</pre><br/><br/>'; 
     1614                exit(); 
     1615                 
     1616                 
    16101617                $i=1; 
    16111618                if(substr($AUX[0][1][0],0,7) == 'boolean') 
     
    16341641                                                foreach($AUX[0][$i][1][1] as $crl) 
    16351642                                                  { 
    1636                                                       if(substr($crl[1][0][1][0][1][0][1],0,4) == 'http') 
     1643                                                      if(substr($crl[1][0][1][0][1][0][1],0,4) == 'http' || substr($crl[1][0][1][0][1][0][1],0,4) == 'ldap') 
    16371644                                                        { 
    16381645                                                                $ret[] = $crl[1][0][1][0][1][0][1]; 
     
    16401647                                                  } 
    16411648                                          } 
    1642                           } 
     1649                        } 
     1650                 
     1651                // Se $ret esta vazio tenta obter crls em outra estrutura(outro layout). 
     1652                if(count($ret) == 0) 
     1653                        { 
     1654                                if(is_array($AUX[0][1][1][1][0][1][0][1][0][1][0])) 
     1655                                        { 
     1656                                                //Pode existir mais de um local para obter a CRL. 
     1657                                                foreach($AUX[0][1][1][1][0][1][0][1][0][1][0]as $crl) 
     1658                                                        { 
     1659                                                                if(substr($crl[1],0,4) == 'http' || substr($crl[1],0,4) == 'ldap') 
     1660                                                                        { 
     1661                                                                                $ret[] = $crl[1]; 
     1662                                                                        } 
     1663                                                        } 
     1664                                          } 
     1665                        } 
     1666                         
    16431667                return array('CRLDISTRIBUTIONPOINTS' => $ret); 
    16441668        }        
Note: See TracChangeset for help on using the changeset viewer.