summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/apps
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2002-07-30 13:38:06 +0000
committernectar <nectar@FreeBSD.org>2002-07-30 13:38:06 +0000
commit2f13e0916590f8488178999aec4874ed5662a031 (patch)
treef3c141823975717e132c7687cf833f6378cc87d4 /crypto/openssl/apps
parent0aed2eea83b351d68092e43b5a9496ce3dd5043d (diff)
downloadFreeBSD-src-2f13e0916590f8488178999aec4874ed5662a031.zip
FreeBSD-src-2f13e0916590f8488178999aec4874ed5662a031.tar.gz
Import of OpenSSL 0.9.6e.
Diffstat (limited to 'crypto/openssl/apps')
-rwxr-xr-xcrypto/openssl/apps/CA.pl2
-rw-r--r--crypto/openssl/apps/Makefile.ssl6
-rw-r--r--crypto/openssl/apps/apps.c20
-rw-r--r--crypto/openssl/apps/asn1pars.c3
-rw-r--r--crypto/openssl/apps/ca.c2
-rw-r--r--crypto/openssl/apps/der_chop2
-rw-r--r--crypto/openssl/apps/pkcs7.c2
-rw-r--r--crypto/openssl/apps/x509.c2
8 files changed, 23 insertions, 16 deletions
diff --git a/crypto/openssl/apps/CA.pl b/crypto/openssl/apps/CA.pl
index f1ac7e7..2f76552 100755
--- a/crypto/openssl/apps/CA.pl
+++ b/crypto/openssl/apps/CA.pl
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/local/bin/perl5
#
# CA - wrapper around ca to make it easier to use ... basically ca requires
# some setup stuff to be done before you can use it and this makes
diff --git a/crypto/openssl/apps/Makefile.ssl b/crypto/openssl/apps/Makefile.ssl
index 7d9bece..0b3208f 100644
--- a/crypto/openssl/apps/Makefile.ssl
+++ b/crypto/openssl/apps/Makefile.ssl
@@ -13,7 +13,7 @@ OPENSSLDIR= /usr/local/ssl
MAKE= make -f Makefile.ssl
MAKEDEPEND= $(TOP)/util/domd $(TOP)
MAKEFILE= Makefile.ssl
-PERL=/usr/local/bin/perl
+PERL= perl
RM= rm -f
PEX_LIBS=
@@ -128,10 +128,10 @@ clean:
rm -f req
$(DLIBSSL):
- (cd ../ssl; $(MAKE))
+ (cd ../ssl; $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}')
$(DLIBCRYPTO):
- (cd ../crypto; $(MAKE))
+ (cd ../crypto; $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}')
$(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
$(RM) $(PROGRAM)
diff --git a/crypto/openssl/apps/apps.c b/crypto/openssl/apps/apps.c
index c22550b..618e34c 100644
--- a/crypto/openssl/apps/apps.c
+++ b/crypto/openssl/apps/apps.c
@@ -228,9 +228,16 @@ void program_name(char *in, char *out, int size)
q=strrchr(p,'.');
if (q == NULL)
- q = in+size;
- strncpy(out,p,q-p);
- out[q-p]='\0';
+ q = p + strlen(p);
+ strncpy(out,p,size-1);
+ if (q-p >= size)
+ {
+ out[size-1]='\0';
+ }
+ else
+ {
+ out[q-p]='\0';
+ }
}
#else
void program_name(char *in, char *out, int size)
@@ -755,7 +762,7 @@ int set_name_ex(unsigned long *flags, const char *arg)
void print_name(BIO *out, char *title, X509_NAME *nm, unsigned long lflags)
{
- char buf[256];
+ char *buf;
char mline = 0;
int indent = 0;
if(title) BIO_puts(out, title);
@@ -764,9 +771,10 @@ void print_name(BIO *out, char *title, X509_NAME *nm, unsigned long lflags)
indent = 4;
}
if(lflags == XN_FLAG_COMPAT) {
- X509_NAME_oneline(nm,buf,256);
- BIO_puts(out,buf);
+ buf = X509_NAME_oneline(nm, 0, 0);
+ BIO_puts(out, buf);
BIO_puts(out, "\n");
+ OPENSSL_free(buf);
} else {
if(mline) BIO_puts(out, "\n");
X509_NAME_print_ex(out, nm, indent, lflags);
diff --git a/crypto/openssl/apps/asn1pars.c b/crypto/openssl/apps/asn1pars.c
index f25c9f8..5339166 100644
--- a/crypto/openssl/apps/asn1pars.c
+++ b/crypto/openssl/apps/asn1pars.c
@@ -181,7 +181,7 @@ bad:
BIO_printf(bio_err,"where options are\n");
BIO_printf(bio_err," -inform arg input format - one of DER TXT PEM\n");
BIO_printf(bio_err," -in arg input file\n");
- BIO_printf(bio_err," -out arg output file\n");
+ BIO_printf(bio_err," -out arg output file (output format is always DER\n");
BIO_printf(bio_err," -noout arg don't produce any output\n");
BIO_printf(bio_err," -offset arg offset into file\n");
BIO_printf(bio_err," -length arg length of section in file\n");
@@ -192,7 +192,6 @@ bad:
BIO_printf(bio_err," -strparse offset\n");
BIO_printf(bio_err," a series of these can be used to 'dig' into multiple\n");
BIO_printf(bio_err," ASN1 blob wrappings\n");
- BIO_printf(bio_err," -out filename output DER encoding to file\n");
goto end;
}
diff --git a/crypto/openssl/apps/ca.c b/crypto/openssl/apps/ca.c
index f342e1f..0618bb5 100644
--- a/crypto/openssl/apps/ca.c
+++ b/crypto/openssl/apps/ca.c
@@ -1108,7 +1108,7 @@ bad:
}
if ((crldays == 0) && (crlhours == 0))
{
- BIO_printf(bio_err,"cannot lookup how long until the next CRL is issuer\n");
+ BIO_printf(bio_err,"cannot lookup how long until the next CRL is issued\n");
goto err;
}
diff --git a/crypto/openssl/apps/der_chop b/crypto/openssl/apps/der_chop
index 9070b03..fbd2889 100644
--- a/crypto/openssl/apps/der_chop
+++ b/crypto/openssl/apps/der_chop
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/local/bin/perl5
#
# der_chop ... this is one total hack that Eric is really not proud of
# so don't look at it and don't ask for support
diff --git a/crypto/openssl/apps/pkcs7.c b/crypto/openssl/apps/pkcs7.c
index 0af2690..a9fff11 100644
--- a/crypto/openssl/apps/pkcs7.c
+++ b/crypto/openssl/apps/pkcs7.c
@@ -88,7 +88,7 @@ int MAIN(int argc, char **argv)
int informat,outformat;
char *infile,*outfile,*prog;
int print_certs=0,text=0,noout=0;
- int ret=0;
+ int ret=1;
apps_startup();
diff --git a/crypto/openssl/apps/x509.c b/crypto/openssl/apps/x509.c
index 9d09d75..b9b1328 100644
--- a/crypto/openssl/apps/x509.c
+++ b/crypto/openssl/apps/x509.c
@@ -233,7 +233,7 @@ int MAIN(int argc, char **argv)
else if (strcmp(*argv,"-CAkeyform") == 0)
{
if (--argc < 1) goto bad;
- CAformat=str2fmt(*(++argv));
+ CAkeyformat=str2fmt(*(++argv));
}
else if (strcmp(*argv,"-days") == 0)
{
OpenPOWER on IntegriCloud