Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[openssl.org #2904] genpkey ignores "-outform DER"

12 views
Skip to first unread message

Vratislav Podzimek via RT

unread,
Oct 30, 2012, 12:34:06 PM10/30/12
to
Description of problem:
Running

$ openssl genpkey -genparam -outform DER -out dh_params.der -algorithm
DH

generates data in the PEM format instead of the requested DER format.

Version-Release number of selected component (if applicable):
openssl-1.0.0j-2.fc17.i686

Steps to Reproduce:
1. run command from the description
2. run 'file dh_params.der'

Actual results:
ASCII text

Expected results:
data

Additional info:
Deprecated (according to openssl(1)) command

$ openssl dhparam -outform DER -out dh_params.der

works as expected.

--
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic

______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List opens...@openssl.org
Automated List Manager majo...@openssl.org

Stephen Henson via RT

unread,
Nov 5, 2012, 11:44:52 AM11/5/12
to
> [vpod...@redhat.com - Tue Oct 30 17:34:05 2012]:
>
> Description of problem:
> Running
>
> $ openssl genpkey -genparam -outform DER -out dh_params.der -algorithm
> DH
>
> generates data in the PEM format instead of the requested DER format.
>
> Version-Release number of selected component (if applicable):
> openssl-1.0.0j-2.fc17.i686
>
> Steps to Reproduce:
> 1. run command from the description
> 2. run 'file dh_params.der'
>
> Actual results:
> ASCII text
>
> Expected results:
> data
>
> Additional info:
> Deprecated (according to openssl(1)) command
>
> $ openssl dhparam -outform DER -out dh_params.der
>
> works as expected.
>

When the pkey utilities (and associated functions) are presented with a
file they have to automatically decide which algorithm to use. This is
fine for public and private key formats which include the algorithm OID
in the associated structures (SubjectPublicKeyInfo or PKCS#8) or the PEM
headers for older private key formats.

In the case of parameters there isn't a DER format that includes the
algorithm type as an OID, just the PEM format where the algorithm to use
is part of the headers.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org

Vratislav Podzimek via RT

unread,
Nov 5, 2012, 1:13:40 PM11/5/12
to
I'm sorry, but I still don't get why:
$ openssl genpkey -genparam -outform DER -out dh_params.der -algorithm
DER

cannot work the same way as:

$ openssl dhparam -outform DER -out dh_params.der

And if it really can't, at least some note in the genpkey(1) man page
would be nice.

--
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic


Rich Salz via RT

unread,
Feb 1, 2016, 5:09:52 PM2/1/16
to
This is an issue reported against 0.9.x/1.0.0 If still an issue with current
release, please open a new ticket.
--
Rich Salz, OpenSSL dev team; rs...@openssl.org

_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

0 new messages