Commit 3a87a9b9 authored by Geoff Thorpe's avatar Geoff Thorpe
Browse files

Reduce header interdependencies, initially in engine.h (the rest of the

changes are the fallout). As this could break source code that doesn't
directly include headers for interfaces it uses, changes to recursive
includes are covered by the OPENSSL_NO_DEPRECATED symbol. It's better to
define this when building and using openssl, and then adapt code where
necessary - this is how to stay current. However the mechanism exists for
the lethargic.
parent ae44fc1e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4,6 +4,15 @@

 Changes between 0.9.7c and 0.9.8  [xx XXX xxxx]

  *) Reduced header interdepencies by declaring more opaque objects in
     ossl_typ.h. As a consequence, including some headers (eg. engine.h) will
     give fewer recursive includes, which could break lazy source code - so
     this change is covered by the OPENSSL_NO_DEPRECATED symbol. As always,
     developers should define this symbol when building and using openssl to
     ensure they track the recommended behaviour, interfaces, [etc], but
     backwards-compatible behaviour prevails when this isn't defined.
     [Geoff Thorpe]

  *) New function X509_POLICY_NODE_print() which prints out policy nodes.
     [Steve Henson]

+6 −3
Original line number Diff line number Diff line
@@ -78,9 +78,12 @@
extern "C" {
#endif

typedef struct dh_st DH;
/* Already defined in ossl_typ.h */
/* typedef struct dh_st DH; */
/* typedef struct dh_method DH_METHOD; */

typedef struct dh_method {
struct dh_method
	{
	const char *name;
	/* Methods here */
	int (*generate_key)(DH *dh);
@@ -95,7 +98,7 @@ typedef struct dh_method {
	char *app_data;
	/* If this is non-NULL, it will be used to generate parameters */
	int (*generate_params)(DH *dh, int prime_len, int generator, BN_GENCB *cb);
} DH_METHOD;
	};

struct dh_st
	{
+6 −3
Original line number Diff line number Diff line
@@ -87,7 +87,9 @@
extern "C" {
#endif

typedef struct dsa_st DSA;
/* Already defined in ossl_typ.h */
/* typedef struct dsa_st DSA; */
/* typedef struct dsa_method DSA_METHOD; */

typedef struct DSA_SIG_st
	{
@@ -95,7 +97,8 @@ typedef struct DSA_SIG_st
	BIGNUM *s;
	} DSA_SIG;

typedef struct dsa_method {
struct dsa_method
	{
	const char *name;
	DSA_SIG * (*dsa_do_sign)(const unsigned char *dgst, int dlen, DSA *dsa);
	int (*dsa_sign_setup)(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
@@ -119,7 +122,7 @@ typedef struct dsa_method {
			BN_GENCB *cb);
	/* If this is non-NULL, it is used to generate DSA keys */
	int (*dsa_keygen)(DSA *dsa);
} DSA_METHOD;
	};

struct dsa_st
	{
+6 −3
Original line number Diff line number Diff line
@@ -83,7 +83,10 @@
extern "C" {
#endif

typedef struct ecdh_method 
/* Already defined in ossl_typ.h */
/* typedef struct ecdh_method ECDH_METHOD; */

struct ecdh_method 
	{
	const char *name;
	int (*compute_key)(void *key, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh,
@@ -94,7 +97,7 @@ typedef struct ecdh_method
#endif
	int flags;
	char *app_data;
} ECDH_METHOD;
	};

typedef struct ecdh_data_st {
	/* EC_KEY_METH_DATA part */
+8 −5
Original line number Diff line number Diff line
@@ -73,13 +73,16 @@
extern "C" {
#endif

/* Already defined in ossl_typ.h */
/* typedef struct ecdsa_method ECDSA_METHOD; */

typedef struct ECDSA_SIG_st
	{
	BIGNUM *r;
	BIGNUM *s;
	} ECDSA_SIG;

typedef struct ecdsa_method 
struct ecdsa_method 
	{
	const char *name;
	ECDSA_SIG *(*ecdsa_do_sign)(const unsigned char *dgst, int dgst_len, 
@@ -94,7 +97,7 @@ typedef struct ecdsa_method
#endif
	int flags;
	char *app_data;
} ECDSA_METHOD;
	};

typedef struct ecdsa_data_st {
	/* EC_KEY_METH_DATA part */
Loading