Changeset 5010 for branches/2.3/security


Ignore:
Timestamp:
08/31/11 13:51:20 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #2251 - No login/ "acolhimento" do certificado, não esta sendo testado se o mesmo esta revogado.

Location:
branches/2.3/security
Files:
2 edited

Legend:

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

    r5007 r5010  
    9999                } 
    100100 
    101  
    102         function data_hora ($valor) 
    103         { 
    104                 $year  = substr($valor, 0, 2); 
    105                 $month = substr($valor, 2, 2); 
    106                 $day   = substr($valor, 4, 2); 
    107                 $hour  = substr($valor, 6, 2); 
    108                 $min   = substr($valor, 8, 2); 
    109                 $sec   = substr($valor, 10, 2); 
    110                 return gmdate('YmdHis',gmmktime($hour, $min, $sec, $month, $day, $year)); 
    111         } 
    112  
     101        function data_hora($valor) 
     102        { 
     103                $aux = '00'.$valor; 
     104                return gmdate('YmdHis',data_hora_L($aux)); 
     105        } 
     106 
     107        function data_hora_L($valor) 
     108        { 
     109                $year  = substr($valor, 2, 2); 
     110                $month = substr($valor, 4, 2); 
     111                $day   = substr($valor, 6, 2); 
     112                $hour  = substr($valor, 8, 2); 
     113                $min   = substr($valor, 10, 2); 
     114                $sec   = substr($valor, 12, 2); 
     115                return gmmktime($hour, $min, $sec, $month, $day, $year); 
     116        } 
    113117 
    114118        function gera_nome_arquivo_temporario($tab_arqs) 
     
    17441748                $dados['INICIO_VALIDADE'] = data_hora($cert_data[1][0][1][$KK][1][0][1]); 
    17451749                $dados['FIM_VALIDADE'] = data_hora($cert_data[1][0][1][$KK][1][1][1]); 
    1746                 $agora = data_hora(date('y').date('m').date('d').date('H').date('i').date('s')); 
    1747                 if(($agora < $dados['INICIO_VALIDADE']) || ($agora > $dados['FIM_VALIDADE'])) 
     1750                $agora = data_hora(date('y').date('m').date('d').(date('H')).date('i').date('s')); 
     1751                if($agora < date("YmdHis",data_hora_L($dados['INICIO_VALIDADE'])) || $agora > date("YmdHis",data_hora_L($dados['FIM_VALIDADE']))) 
    17481752                        { 
    17491753                                $dados['EXPIRADO'] = true; 
     
    17561760                } 
    17571761 
    1758  
     1762                 
    17591763function AUTHORITYKEYIDENTIFIER($xx, $certificado_digital_formato_der) 
    17601764        { 
  • branches/2.3/security/vercert.php

    r4127 r5010  
    2323require_once('classes/Verifica_Certificado.php'); 
    2424include('classes/Verifica_Certificado_conf.php'); 
    25 $cert = troca_espaco_por_mais(str_replace(chr(0x0D).chr(0x0A),chr(0x0A),str_replace(chr(0x0A).chr(0x0A),chr(0x0A),$_POST['certificado']))); 
     25$cert = troca_espaco_por_mais($_POST['certificado']); 
    2626$c = new certificadoB(); 
    2727$c->certificado($cert); 
Note: See TracChangeset for help on using the changeset viewer.