Data Domain: importazione del certificato non riuscita. Algoritmo utilizzato non supportato.
Summary: Quando si tenta di importare un certificato in un DD, l'operazione ha esito negativo a causa di un algoritmo non supportato utilizzato per generare il certificato.
Instructions
Esposizione del problema
sysadmin@DDhostname(active:1)# adminaccess certificate import host application all file DDhostname.p12
Enter password:
** Importing the certificate will restart the http/https services and currently active http/https user sessions will be terminated.
Do you want to import this certificate? (yes|no) [yes]: yes
**** Certificate import failed. Unsupported algorithm used.
Only "PBES2, PBKDF2, AES-256-CBC" (AES-256-CBC) encryption algorithm is supported for the PKCS12 file.
Root cause:
La modifica del comportamento per richiedere algoritmi più sicuri è stata aggiunta per la prima volta nella versione 8.4 e poi sottoposta a backporting alle versioni 7.13.1.40 e 8.3.1.10.
Da pagina 24 della Guida alla configurazione della sicurezza 8.4:
"I formati PKCS12 e PEM sono supportati. AES-256-CBC è l'unico algoritmo di crittografia supportato per i file PKCS12."
SOLUZIONE ALTERNATIVA / NOTE:
il file del keystore PKCS12 non conforme può essere facilmente convertito in un keystore conforme con algoritmo AES-256-CBC eseguendo i seguenti 2 comandi
Passo #1: Esportare la chiave privata e il certificato dal file dell'archivio chiavi PKCS#12 non conforme in formato PEM:
openssl pkcs12 -in nonCompiantkeystore.p12 -nokeys -out cert.pem
openssl pkcs12 -in nonCompiantkeystore.p12 -nodes -nocerts -out key.pem
Passo #2: Converti i file di coppia di chiavi esportati in un file di archivio chiavi PKCS#12 compilante:
openssl pkcs12 -export -in cert.pem -inkey key.pem -name tomcat -out Compiantkeystore.p12 -macalg SHA256 -keypbe AES-256-CBC -certpbe AES-256-CBC -passout pass:DD_1234
Passo #3: (Opzionale) Convalidare l'algoritmo del file convertito:
openssl pkcs12 -info -in Compiantkeystore.p12 -noout
openssl pkcs12 -info -in ddv.p12 -noout
openssl pkcs12 -in ddv.p12 -clcerts -nokeys -out cert.pem
openssl pkcs12 -in ddv.p12 -cacerts -nokeys -out public.pem
openssl pkcs12 -in ddv.p12 -nocerts -out key.pem
openssl rsa -in key.pem -out dkey.pem
openssl pkcs12 -export -out ddvnew.p12 -keypbe AES-256-CBC -certpbe AES-256-CBC -certfile public.pem -inkey dkey.pem -in cert.pem