How to check if a RSA Private key matches a certificate

2013-04-10 Thread Jaime Hablutzel Egoavil
Today I have realized that a buggy PKCS#11 module for a cryptographic token I'm working with is returning a wrong private key for a given certificate, thus when calling org.mozilla.jss.CryptoManager#findPrivKeyByCert for 'cert 1' the private key for 'cert 2' is returned, then my software generat

Re: Certutil - Generate new key

2013-04-10 Thread daniemarques
Thanks for your reply On Wednesday, April 10, 2013 9:10:33 PM UTC+1, Kai Engert wrote: > On Wed, 2013-04-10 at 11:36 -0700, daniemarq...@gmail.com wrote: > > > I'm trying to generate a Certificate Signing Request to be later signed by > > a CA and imported to a NSS database. > > > > > > Curr

Re: Certutil - Generate new key

2013-04-10 Thread Kai Engert
On Wed, 2013-04-10 at 11:36 -0700, daniemarq...@gmail.com wrote: > I'm trying to generate a Certificate Signing Request to be later signed by a > CA and imported to a NSS database. > > Currently Using the following commands: > > certutil -R -d alias -f nssPasswordFile -s "sample-dn" -n "sample-

Certutil - Generate new key

2013-04-10 Thread daniemarques
Hi I'm trying to generate a Certificate Signing Request to be later signed by a CA and imported to a NSS database. Currently Using the following commands: certutil -R -d alias -f nssPasswordFile -s "sample-dn" -n "sample-dn" -k "rsa" -g 2048 -o cert.req -a -z noiseFile Then using sslget to re

Re: JSS: How to recover only certificates wich have an associated private key.

2013-04-10 Thread Jaime Hablutzel Egoavil
Take into account that this method (at least in jss3) won't return null on the absence of a private key for a given certificate but it will throw an exception, so you have to handle exceptions as program logic, something like ... List certificatesWithMatchingPrivKey = ...; try { cryptoManage