Remove old digest type hacks for non RSA keys.
[openssl.git] / apps / pkcs7.c
index da4dbe7a07c0706a223784f2143495fd414a9f58..86d31b99a71f6c52abfbe9f04ca023b00ca5c8b5 100644 (file)
@@ -90,7 +90,7 @@ int MAIN(int argc, char **argv)
        BIO *in=NULL,*out=NULL;
        int informat,outformat;
        char *infile,*outfile,*prog;
-       int print_certs=0,text=0,noout=0;
+       int print_certs=0,text=0,noout=0,p7_print=0;
        int ret=1;
 #ifndef OPENSSL_NO_ENGINE
        char *engine=NULL;
@@ -139,6 +139,8 @@ int MAIN(int argc, char **argv)
                        noout=1;
                else if (strcmp(*argv,"-text") == 0)
                        text=1;
+               else if (strcmp(*argv,"-print") == 0)
+                       p7_print=1;
                else if (strcmp(*argv,"-print_certs") == 0)
                        print_certs=1;
 #ifndef OPENSSL_NO_ENGINE
@@ -238,6 +240,9 @@ bad:
                        }
                }
 
+       if (p7_print)
+               PKCS7_print_ctx(out, p7, 0, NULL);
+
        if (print_certs)
                {
                STACK_OF(X509) *certs=NULL;