RT3548: Remove unsupported platforms
[openssl.git] / apps / req.c
index 316163ff786af3790d774574c771350519948a27..e23c9197a5d32b3477f6be199af7aebd94b8bc5c 100644 (file)
  * [including the GNU Public Licence.]
  */
 
-/* Until the key-gen callbacks are modified to use newer prototypes, we allow
- * deprecated functions for openssl-internal code */
-#ifdef OPENSSL_NO_DEPRECATED
-#undef OPENSSL_NO_DEPRECATED
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
 #include <string.h>
-#ifdef OPENSSL_NO_STDIO
-#define APPS_WIN16
-#endif
 #include "apps.h"
 #include <openssl/bio.h>
 #include <openssl/evp.h>
 #undef PROG
 #define PROG   req_main
 
-/* -inform arg - input format - default PEM (DER or PEM)
+/*-
+ * -inform arg - input format - default PEM (DER or PEM)
  * -outform arg - output format - default PEM
  * -in arg     - input file - default stdin
  * -out arg    - output file - default stdout
@@ -511,7 +503,7 @@ bad:
                        oid_bio=BIO_new_file(p,"r");
                        if (oid_bio == NULL) 
                                {
-                               /*
+                               /*-
                                BIO_printf(bio_err,"problems opening %s for extra oid's\n",p);
                                ERR_print_errors(bio_err);
                                */
@@ -1486,7 +1478,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 +1543,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 +1765,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;
        }