#ifndef NO_MD5
#include <openssl/md5.h>
#endif
-#if !defined(NO_SHA) || !defined(NO_SHA1)
+#ifndef NO_SHA
#include <openssl/sha.h>
#endif
-#ifndef NO_RMD160
+#ifndef NO_RIPEMD
#include <openssl/ripemd.h>
#endif
#ifndef NO_DES
#ifndef NO_RC5
#include <openssl/rc5.h>
#endif
-#ifndef NO_BLOWFISH
+#ifndef NO_BF
#include <openssl/blowfish.h>
#endif
#ifndef NO_CAST
#ifndef NO_RSA
#include <openssl/rsa.h>
-#else
-#define RSA long
#endif
#ifndef NO_DSA
#include <openssl/dsa.h>
-#else
-#define DSA long
#endif
#ifndef NO_DH
#include <openssl/dh.h>
-#else
-#define DH long
#endif
#include <openssl/objects.h>
int references;
union {
char *ptr;
+#ifndef NO_RSA
struct rsa_st *rsa; /* RSA */
+#endif
+#ifndef NO_DSA
struct dsa_st *dsa; /* DSA */
+#endif
+#ifndef NO_DH
struct dh_st *dh; /* DH */
+#endif
} pkey;
int save_parameters;
STACK /*X509_ATTRIBUTE*/ *attributes; /* [ 0 ] */
#ifndef NO_MD5
MD5_CTX md5;
#endif
-#ifndef NO_RMD160
+#ifndef NO_RIPEMD
RIPEMD160_CTX ripemd160;
#endif
-#if !defined(NO_SHA) || !defined(NO_SHA1)
+#ifndef NO_SHA
SHA_CTX sha;
#endif
#ifndef NO_MDC2
#ifndef NO_RC5
RC5_32_KEY rc5_ks;/* key schedule */
#endif
-#ifndef NO_BLOWFISH
+#ifndef NO_BF
BF_KEY bf_ks;/* key schedule */
#endif
#ifndef NO_CAST
#define EVP_CIPHER_CTX_iv_length(e) ((e)->cipher->iv_len)
#define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data)
#define EVP_CIPHER_CTX_set_app_data(e,d) ((e)->app_data=(char *)(d))
+#define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c))
#define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80)
#define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80)
int EVP_PKEY_save_parameters(EVP_PKEY *pkey,int mode);
int EVP_PKEY_cmp_parameters(EVP_PKEY *a,EVP_PKEY *b);
+int EVP_CIPHER_type(const EVP_CIPHER *ctx);
+
/* calls methods */
int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);