summaryrefslogtreecommitdiff
path: root/main/openssl/apps/req.c
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-06-15 22:21:10 +0200
committerArne Schwabe <arne@rfc2549.org>2014-06-15 22:21:10 +0200
commitc35453897494d2b488961f7a446b4df8e24c6f31 (patch)
treea454987f969b676b446a518ed51e70e9bc9e00ca /main/openssl/apps/req.c
parent5d397e6220daa87129883a93353286cd6ffd18e8 (diff)
Update OpenSSL to 1.0.1h
Diffstat (limited to 'main/openssl/apps/req.c')
-rw-r--r--main/openssl/apps/req.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/main/openssl/apps/req.c b/main/openssl/apps/req.c
index 5e034a85..d41385d7 100644
--- a/main/openssl/apps/req.c
+++ b/main/openssl/apps/req.c
@@ -1489,7 +1489,13 @@ start:
#ifdef CHARSET_EBCDIC
ebcdic2ascii(buf, buf, i);
#endif
- if(!req_check_len(i, n_min, n_max)) goto start;
+ if(!req_check_len(i, n_min, n_max))
+ {
+ if (batch || value)
+ return 0;
+ goto start;
+ }
+
if (!X509_NAME_add_entry_by_NID(n,nid, chtype,
(unsigned char *) buf, -1,-1,mval)) goto err;
ret=1;
@@ -1548,7 +1554,12 @@ start:
#ifdef CHARSET_EBCDIC
ebcdic2ascii(buf, buf, i);
#endif
- if(!req_check_len(i, n_min, n_max)) goto start;
+ if(!req_check_len(i, n_min, n_max))
+ {
+ if (batch || value)
+ return 0;
+ goto start;
+ }
if(!X509_REQ_add1_attr_by_NID(req, nid, chtype,
(unsigned char *)buf, -1)) {