Commit 73e92de5 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Add NO_ASN1_OLD to remove some old style functions:

currently OpenSSL itself wont compile with this set
because some old style stuff remains.

Change old functions X509_sign(), X509_verify() etc
to use new item based functions.

Replace OCSP function declarations with DECLARE macros.
parent 09ab755c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -4,7 +4,10 @@
 Changes between 0.9.6 and 0.9.7  [xx XXX 2000]

  *) New ASN1 functions to handle sign, verify, digest, pack and
     unpack operations in terms of ASN1_ITEM.
     unpack operations in terms of ASN1_ITEM. Modify existing wrappers
     to use new functions. Add NO_ASN1_OLD which can be set to remove
     some old style ASN1 functions: this can be used to determine if old
     code will still work when these eventually go away.
     [Steve Henson]

  *) New extension functions for OCSP structures, these follow the
+4 −0
Original line number Diff line number Diff line
@@ -69,6 +69,8 @@
#include <openssl/buffer.h>
#include <openssl/x509.h>

#ifndef NO_ASN1_OLD

int ASN1_digest(int (*i2d)(), const EVP_MD *type, char *data,
		unsigned char *md, unsigned int *len)
	{
@@ -88,6 +90,8 @@ int ASN1_digest(int (*i2d)(), const EVP_MD *type, char *data,
	return(1);
	}

#endif


int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn,
		unsigned char *md, unsigned int *len)
+3 −0
Original line number Diff line number Diff line
@@ -60,6 +60,8 @@
#include "cryptlib.h"
#include <openssl/asn1_mac.h>

#ifndef NO_ASN1_OLD

typedef struct
    {
    unsigned char *pbData;
@@ -215,3 +217,4 @@ err:
	return(NULL);
	}

#endif
+4 −0
Original line number Diff line number Diff line
@@ -71,6 +71,8 @@
#include <openssl/objects.h>
#include <openssl/buffer.h>

#ifndef NO_ASN1_OLD

int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
	     ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey,
	     const EVP_MD *type)
@@ -147,6 +149,8 @@ err:
	return(outl);
	}

#endif

int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
	     ASN1_BIT_STRING *signature, void *asn, EVP_PKEY *pkey,
	     const EVP_MD *type)
+4 −0
Original line number Diff line number Diff line
@@ -71,6 +71,8 @@
#include <openssl/buffer.h>
#include <openssl/evp.h>

#ifndef NO_ASN1_OLD

int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature,
	     char *data, EVP_PKEY *pkey)
	{
@@ -118,6 +120,8 @@ err:
	return(ret);
	}

#endif


int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signature,
	     void *asn, EVP_PKEY *pkey)
Loading