On Thu, Jul 17, 2014 at 12:09:29AM -0400, Salz, Rich wrote:
> > You've declared "-days" to take only positive numbers, it should allow
> > negative numbers.
> 
> Pushed, thanks.

Also the keyform option definition string looks wrong:

    "keyform", OPT_KEYFORM, 'f', "Private key file format (PEM or ENGINE)"

while the valid choices seem to be PEM or DER, not PEM or ENGINE:

    doc/apps/ca.pod:[B<-keyform PEM|DER>]
    doc/apps/ca.pod:=item B<-keyform PEM|DER>
    doc/apps/dgst.pod:[B<-keyform arg>]
    doc/apps/dgst.pod:=item B<-keyform arg>
    doc/apps/pkeyutl.pod:[B<-keyform PEM|DER>]
    doc/apps/pkeyutl.pod:=item B<-keyform PEM|DER>
    doc/apps/req.pod:[B<-keyform PEM|DER>]
    doc/apps/req.pod:=item B<-keyform PEM|DER>
    doc/apps/s_client.pod:[B<-keyform DER|PEM>]
    doc/apps/s_client.pod:=item B<-keyform format>
    doc/apps/s_server.pod:[B<-keyform DER|PEM>]
    doc/apps/s_server.pod:[B<-dkeyform DER|PEM>]
    doc/apps/s_server.pod:=item B<-keyform format>
    doc/apps/s_server.pod:=item B<-dcertform format>, B<-dkeyform format>,
    B<-dpass arg>
    doc/apps/x509.pod:[B<-keyform DER|PEM>]
    doc/apps/x509.pod:[B<-CAkeyform DER|PEM>]
    doc/apps/x509.pod:=item B<-keyform PEM|DER>
    doc/apps/x509.pod:The format or B<key> can be specified using the
    B<-keyform> option.

In any case avoid magic constants in function call arguments:

        opt_format(..., 1, ...)

instead:

    #define ANY_FORMAT 0
    #define PEMDER_FORMAT 1

and use these only, or use an enum instead of defines if you prefer.

-- 
        Viktor.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to