Commit 954ef7ef authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Merge some common functionality in the apps, delete
the encryption option in the pkcs7 utility (they never
did anything) and add a couple more options to pkcs7.
parent c4471290
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4,6 +4,10 @@

 Changes between 0.9.4 and 0.9.5  [xx XXX 1999]

  *) Add options -text and -noout to pkcs7 utility and delets the
     encryption options which never did anything. Update docs.
     [Steve Henson]

  *) Add options to some of the utilities to allow the pass phrase
     to be included on either the command line (not recommended on
     OSes like Unix) or read from the environment. Update the
+14 −0
Original line number Diff line number Diff line
@@ -335,3 +335,17 @@ int MS_CALLBACK key_cb(char *buf, int len, int verify, void *key)
	memcpy(buf,key,i);
	return(i);
	}

int dump_cert_text (BIO *out, X509 *x)
{
	char buf[256];
	X509_NAME_oneline(X509_get_subject_name(x),buf,256);
	BIO_puts(out,"subject=");
	BIO_puts(out,buf);

	X509_NAME_oneline(X509_get_issuer_name(x),buf,256);
	BIO_puts(out,"\nissuer= ");
	BIO_puts(out,buf);
	BIO_puts(out,"\n");
        return 0;
}
+4 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@
#include <openssl/buffer.h>
#include <openssl/bio.h>
#include <openssl/crypto.h>
#include <openssl/x509.h>
#include "progs.h"

int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn);
@@ -143,6 +144,9 @@ int str2fmt(char *s);
void program_name(char *in,char *out,int size);
int chopup_args(ARGS *arg,char *buf, int *argc, char **argv[]);
int MS_CALLBACK key_cb(char *buf,int len,int verify,void *u);
#ifdef HEADER_X509_H
int dump_cert_text(BIO *out, X509 *x);
#endif
#define FORMAT_UNDEF    0
#define FORMAT_ASN1     1
#define FORMAT_TEXT     2
+0 −15
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@
#undef PROG
#define PROG nseq_main

static int dump_cert_text(BIO *out, X509 *x);

int MAIN(int argc, char **argv)
{
@@ -158,17 +157,3 @@ end:
	EXIT(ret);
}
static int dump_cert_text(BIO *out, X509 *x)
{
	char buf[256];
	X509_NAME_oneline(X509_get_subject_name(x),buf,256);
	BIO_puts(out,"subject=");
	BIO_puts(out,buf);

	X509_NAME_oneline(X509_get_issuer_name(x),buf,256);
	BIO_puts(out,"\nissuer= ");
	BIO_puts(out,buf);
	BIO_puts(out,"\n");
	return 0;
}
+0 −15
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ EVP_CIPHER *enc;
#define CACERTS		0x10

int get_cert_chain(X509 *cert, STACK_OF(X509) **chain);
int dump_cert_text (BIO *out, X509 *x);
int dump_certs_keys_p12(BIO *out, PKCS12 *p12, char *pass, int passlen, int options);
int dump_certs_pkeys_bags(BIO *out, STACK *bags, char *pass, int passlen, int options);
int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bags, char *pass, int passlen, int options);
@@ -453,20 +452,6 @@ int MAIN(int argc, char **argv)
    EXIT(ret);
}

int dump_cert_text (BIO *out, X509 *x)
{
	char buf[256];
	X509_NAME_oneline(X509_get_subject_name(x),buf,256);
	BIO_puts(out,"subject=");
	BIO_puts(out,buf);

	X509_NAME_oneline(X509_get_issuer_name(x),buf,256);
	BIO_puts(out,"\nissuer= ");
	BIO_puts(out,buf);
	BIO_puts(out,"\n");
        return 0;
}

int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass,
	     int passlen, int options)
{
Loading