[MASOCH-L] Openssl : duvida para gerar senha de protecao do certificado

Rejaine Monteiro rejaine at bhz.jamef.com.br
Fri Nov 13 10:55:36 BRST 2009


Oi,

Estou gerando uma chave protegida por senha usando o openssl, mas parece
que a proteção por senha não está sendo aceita
O certificado é criado normalmente, porém ao validar ou fazer um teste
com a senha informada, posso digitar qualquer coisa que passa...

Estou fazendo assim:


# openssl req -days 3650 -nodes -new -keyout cli.key -out cli.csr
-config /home/vpn/openssl.cnf

Generating a 1024 bit RSA private key
..............................................................++++++
...++++++
writing new private key to 'cli.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [BR]:
State or Province Name (full name) [Minas Gerais]:
Locality Name (eg, city) [Belo Horizonte]:
Organization Name (eg, company) [Teste.Org]:
Organizational Unit Name (eg, section) [Teste]:
Common Name (eg. employe) []:cli
Email Address [abc at teste.org]:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:123456
An optional company name []:


Depois, executo:

# openssl ca -batch -days 3650 -out cli.crt -in cli.csr -config
/home/vpn/openssl.cnf

Using configuration from /home/vpn/openssl.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName           :PRINTABLE:'BR'
stateOrProvinceName   :PRINTABLE:'Minas Gerais'
localityName          :PRINTABLE:'Belo Horizonte'
organizationName      :PRINTABLE:'Teste.Org'
organizationalUnitName:PRINTABLE:'Teste'
emailAddress          :IA5STRING:'abc at teste.org'
Certificate is to be certified until Nov 11 12:43:54 2019 GMT (3650 days)

Write out database with 1 new entries
Data Base Updated


Em seguida, estou usando o comando abaixo (gerando um arquivo .PFX
qualquer) somente para testar a senha:

# openssl pkcs12 -export -in cli.crt -inkey cli.key -out cli.pfx

Enter Export Password: xxxxx
Verifying - Enter Export Password: xxxx

Se eu digitar qualquer coisa, o comando é aceito  normalmente (não dá
erro de senha inválida,  retorna o comando com status 0)  , ou seja, a
senha está sendo ignorada..

Ele não deveria checar a consistência da senha?

O que tá errado??






More information about the masoch-l mailing list