From a0f6331507550d6a92bef3114f68e9fbd55e3387 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 30 May 2002 09:42:52 +0000 Subject: [PATCH] Merge in recent changes from 0.9.6-stable --- apps/asn1pars.c | 3 +-- crypto/asn1/a_bitstr.c | 6 ++++-- crypto/dso/dso_dlfcn.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/asn1pars.c b/apps/asn1pars.c index f25c9f84e8..5339166e08 100644 --- a/apps/asn1pars.c +++ b/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/asn1/a_bitstr.c b/crypto/asn1/a_bitstr.c index cdedb29e4f..ecc0d4b8cd 100644 --- a/crypto/asn1/a_bitstr.c +++ b/crypto/asn1/a_bitstr.c @@ -89,8 +89,6 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) if (a == NULL) return(0); len=a->length; - ret=1+len; - if (pp == NULL) return(ret); if (len > 0) { @@ -118,6 +116,10 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) } else bits=0; + + ret=1+len; + if (pp == NULL) return(ret); + p= *pp; *(p++)=(unsigned char)bits; diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c index e709c721cc..acf09f5a08 100644 --- a/crypto/dso/dso_dlfcn.c +++ b/crypto/dso/dso_dlfcn.c @@ -112,7 +112,7 @@ DSO_METHOD *DSO_METHOD_dlfcn(void) * as we don't have autoconf yet, I'm implementing a hack that could * be hacked further relatively easily to deal with cases as we find * them. Initially this is to cope with OpenBSD. */ -#ifdef __OpenBSD__ +#if defined(__OpenBSD__) || defined(__NetBSD__) # ifdef DL_LAZY # define DLOPEN_FLAG DL_LAZY # else -- 2.25.1