Add OPENSSL_NO_ECDH guards
[oweals/openssl.git] / apps / req.c
index 316163ff786af3790d774574c771350519948a27..87ab41293d1d39add005890cdf234828a5f0801b 100644 (file)
@@ -1486,7 +1486,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;
@@ -1545,7 +1551,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)) {
@@ -1762,9 +1773,6 @@ static int genpkey_cb(EVP_PKEY_CTX *ctx)
        if (p == 3) c='\n';
        BIO_write(b,&c,1);
        (void)BIO_flush(b);
-#ifdef LINT
-       p=n;
-#endif
        return 1;
        }