I have a couple of certificates whose format seem pretty similar except for one thing I have checked the details of the cert by using the following openssl command

```
openssl x509 -in certname -text
```

In one of the certificates, the Subject Public Key info appears like this

`Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (1024 bit)`

The other looks like

`Subject Public Key Info: Public Key Algorithm: rsaEncryption Public Key: (1024 bit)`

I generated a certificate using the following command

```
openssl genrsa -out my.key 1024
openssl req -new -key my.key -config -out my.req
openssl ca -out my.crt -infiles my.req
```

My cert contains Public Key: (1024 bit) and not "RSA Public Key: (1024 bit)"

What needs to be done differently to get the "RSA Public Key: (1024 bit)" in the certificate? My my.key starts with

```
-----BEGIN RSA PRIVATE KEY-----
```

so it's a RSA key.

`openssl rsa -noout -text -in certname`

and`openssl dsa -noout -text -in certname`

on your certs. My guess is the first one is a DSA key, and it will fail with`read DSA key unable to load Key 139673943688872:error:06078081:digital envelope routines:EVP_PKEY_get1_DSA:expecting a dsa key:p_lib.c:308:`

– dawud Apr 18 '13 at 12:16`openssl rsa -in`

&`openssl dsa -in`

both expect a key as input - how can you read a cert with it? - As expected both commands gave me`unable to load Private Key 11984:error:0906D06C:PEM routines:PEM_read_bio:no start line:.\crypto\pem\pem_lib.c:696:Expecting: ANY PRIVATE KEY`

– user93353 Apr 18 '13 at 12:21`openssl rsa`

command – user93353 Apr 18 '13 at 14:05