summaryrefslogtreecommitdiffstats
path: root/fips/fips_utl.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-08-08 14:47:51 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-08-08 14:47:51 +0000
commit8d7fbd021b5ee42fcd963b158ce9880abdf64573 (patch)
treefbed864bef101901228406b2194dfdc434d932e1 /fips/fips_utl.h
parent49e9b97885d0bdc50fa68aed0a0e8fd4162f3894 (diff)
Fix DSA to skip EOL test when parsing mod line.
Diffstat (limited to 'fips/fips_utl.h')
-rw-r--r--fips/fips_utl.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/fips/fips_utl.h b/fips/fips_utl.h
index 6cb58094b8..899422f438 100644
--- a/fips/fips_utl.h
+++ b/fips/fips_utl.h
@@ -58,6 +58,7 @@ int do_hex2bn(BIGNUM **pr, const char *in);
int do_bn_print(FILE *out, const BIGNUM *bn);
int do_bn_print_name(FILE *out, const char *name, const BIGNUM *bn);
int parse_line(char **pkw, char **pval, char *linebuf, char *olinebuf);
+int parse_line2(char **pkw, char **pval, char *linebuf, char *olinebuf, int eol);
BIGNUM *hex2bn(const char *in);
int tidy_line(char *linebuf, char *olinebuf);
int bint2bin(const char *in, int len, unsigned char *out);
@@ -262,6 +263,11 @@ int do_bn_print_name(FILE *out, const char *name, const BIGNUM *bn)
int parse_line(char **pkw, char **pval, char *linebuf, char *olinebuf)
{
+ return parse_line2(pkw, pval, linebuf, olinebuf, 1);
+ }
+
+int parse_line2(char **pkw, char **pval, char *linebuf, char *olinebuf, int eol)
+ {
char *keyword, *value, *p, *q;
strcpy(linebuf, olinebuf);
keyword = linebuf;
@@ -292,7 +298,7 @@ int parse_line(char **pkw, char **pval, char *linebuf, char *olinebuf)
/* Remove trailing space from value */
p = value + strlen(value) - 1;
- if (*p != '\n')
+ if (eol && *p != '\n')
fprintf(stderr, "Warning: missing EOL\n");
while (*p == '\n' || isspace((unsigned char)*p))