perlasm/cbc.pl: fix tail processing bug [from HEAD].
[oweals/openssl.git] / crypto / dh / dh_prn.c
index 04e7c55b7a8345b533724623dba35f3a23d6268c..ae58c2ac873bac47f7c5e6bff56978ef7917cbb5 100644 (file)
@@ -78,47 +78,3 @@ int DHparams_print_fp(FILE *fp, const DH *x)
        return(ret);
        }
 #endif
-
-int DHparams_print(BIO *bp, const DH *x)
-       {
-       unsigned char *m=NULL;
-       int reason=ERR_R_BUF_LIB,ret=0;
-       size_t buf_len=0, i;
-
-       if (x->p)
-               buf_len = (size_t)BN_num_bytes(x->p);
-       else
-               {
-               reason = ERR_R_PASSED_NULL_PARAMETER;
-               goto err;
-               }
-       if (x->g)
-               if (buf_len < (i = (size_t)BN_num_bytes(x->g)))
-                       buf_len = i;
-       m=(unsigned char *)OPENSSL_malloc(buf_len+10);
-       if (m == NULL)
-               {
-               reason=ERR_R_MALLOC_FAILURE;
-               goto err;
-               }
-
-       if (BIO_printf(bp,"Diffie-Hellman-Parameters: (%d bit)\n",
-               BN_num_bits(x->p)) <= 0)
-               goto err;
-       if (!ASN1_bn_print(bp,"prime:",x->p,m,4)) goto err;
-       if (!ASN1_bn_print(bp,"generator:",x->g,m,4)) goto err;
-       if (x->length != 0)
-               {
-               if (BIO_printf(bp,"    recommended-private-length: %d bits\n",
-                       (int)x->length) <= 0) goto err;
-               }
-       ret=1;
-       if (0)
-               {
-err:
-               DHerr(DH_F_DHPARAMS_PRINT,reason);
-               }
-       if (m != NULL) OPENSSL_free(m);
-       return(ret);
-       }
-