Reject empty generation strings.
[openssl.git] / apps / dh.c
index 48fecc996034985640e88bfc3b462b2c9cab5600..1b653f548a6de4780cd8aa0d7bee4bdc798d6822 100644 (file)
--- a/apps/dh.c
+++ b/apps/dh.c
@@ -233,15 +233,6 @@ int MAIN(int argc, char **argv)
 
     if (text) {
         DHparams_print(out, dh);
-# ifdef undef
-        printf("p=");
-        BN_print(stdout, dh->p);
-        printf("\ng=");
-        BN_print(stdout, dh->g);
-        printf("\n");
-        if (dh->length != 0)
-            printf("recommended private length=%ld\n", dh->length);
-# endif
     }
 
     if (check) {
@@ -319,12 +310,9 @@ int MAIN(int argc, char **argv)
     }
     ret = 0;
  end:
-    if (in != NULL)
-        BIO_free(in);
-    if (out != NULL)
-        BIO_free_all(out);
-    if (dh != NULL)
-        DH_free(dh);
+    BIO_free(in);
+    BIO_free_all(out);
+    DH_free(dh);
     apps_shutdown();
     OPENSSL_EXIT(ret);
 }