Ignore:
Timestamp:
12/19/11 14:11:08 (12 years ago)
Author:
rafaelraymundo
Message:

Ticket #2395 - Assinatura/cifragem digital de emails - Suporte a SHA512.

File:
1 edited

Legend:

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

    r4916 r5271  
    113113                while ($erro = openssl_error_string()); //  Limpa buffer de erros anteriores...... 
    114114                $this->erros_ssl = array(); 
    115                 $resultado = openssl_pkcs7_encrypt($m_arquivo_temporario,$enc_arquivo_temporario,$c,$h,$flags=0,$cipherid=OPENSSL_CIPHER_DES); 
     115                // Se he PHP 5.4 , ou maior, usar "OPENSSL_CIPHER_AES_256_CBC" .  
     116                $cipher_id = ((double)phpversion() >= 5.4 ? OPENSSL_CIPHER_AES_256_CBC : OPENSSL_CIPHER_DES); 
     117                $resultado = openssl_pkcs7_encrypt($m_arquivo_temporario,$enc_arquivo_temporario,$c,$h,$flags=0,$cipherid=$cipher_id); 
    116118                //$resultado = openssl_pkcs7_encrypt($m_arquivo_temporario,$enc_arquivo_temporario,$c,$h); 
    117119                if(!$resultado) 
Note: See TracChangeset for help on using the changeset viewer.