Fix numeric -newkey args.
Contributed by: Bodo Moeller <3moeller@informatik.uni-hamburg.de>
This commit is contained in:
parent
5b00115ab0
commit
bc4deee07a
3
CHANGES
3
CHANGES
@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
Changes between 0.9.1c and 0.9.2
|
Changes between 0.9.1c and 0.9.2
|
||||||
|
|
||||||
|
*) Don't blow it for numeric -newkey arguments to apps/req.
|
||||||
|
[Bodo Moeller <3moeller@informatik.uni-hamburg.de>]
|
||||||
|
|
||||||
*) Temp key "for export" tests were wrong in s3_srvr.c.
|
*) Temp key "for export" tests were wrong in s3_srvr.c.
|
||||||
[Anonymous <nobody@replay.com>]
|
[Anonymous <nobody@replay.com>]
|
||||||
|
|
||||||
|
@ -221,12 +221,15 @@ char **argv;
|
|||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-newkey") == 0)
|
else if (strcmp(*argv,"-newkey") == 0)
|
||||||
{
|
{
|
||||||
|
int is_numeric;
|
||||||
|
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
p= *(++argv);
|
p= *(++argv);
|
||||||
if ((strncmp("rsa:",p,4) == 0) ||
|
is_numeric = p[0] >= '0' && p[0] <= '9';
|
||||||
((p[0] >= '0') && (p[0] <= '9')))
|
if (strncmp("rsa:",p,4) == 0 || is_numeric)
|
||||||
{
|
{
|
||||||
pkey_type=TYPE_RSA;
|
pkey_type=TYPE_RSA;
|
||||||
|
if(!is_numeric)
|
||||||
p+=4;
|
p+=4;
|
||||||
newkey= atoi(p);
|
newkey= atoi(p);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user