diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-01-27 19:10:56 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-01-27 19:10:56 +0000 |
commit | 7edfe6745670d2f4d53d96f268f2dba11326a51c (patch) | |
tree | 781e222d8af65fec366d3af0d132022a62c95435 /crypto/evp/evp.h | |
parent | d8ad2e6112d4757eeca8d6dac9cabf9fed330321 (diff) |
Move all FIPSAPI renames into fips.h header file, include early in
crypto.h if needed.
Modify source tree to handle change.
Diffstat (limited to 'crypto/evp/evp.h')
-rw-r--r-- | crypto/evp/evp.h | 58 |
1 files changed, 4 insertions, 54 deletions
diff --git a/crypto/evp/evp.h b/crypto/evp/evp.h index 086da7c794..01f43993aa 100644 --- a/crypto/evp/evp.h +++ b/crypto/evp/evp.h @@ -526,70 +526,20 @@ __owur int EVP_Cipher(EVP_CIPHER_CTX *c, #define EVP_delete_digest_alias(alias) \ OBJ_NAME_remove(alias,OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS); -#ifdef OPENSSL_FIPS -void FIPS_md_ctx_init(EVP_MD_CTX *ctx); -EVP_MD_CTX *FIPS_md_ctx_create(void); -void FIPS_md_ctx_destroy(EVP_MD_CTX *ctx); -int FIPS_digestinit(EVP_MD_CTX *ctx, const EVP_MD *type); -int FIPS_digestupdate(EVP_MD_CTX *ctx, const void *data, size_t count); -int FIPS_digestfinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size); -int FIPS_digest(const void *data, size_t count, - unsigned char *md, unsigned int *size, const EVP_MD *type); -int FIPS_md_ctx_cleanup(EVP_MD_CTX *ctx); -int FIPS_md_ctx_copy(EVP_MD_CTX *out,const EVP_MD_CTX *in); - - -void FIPS_cipher_ctx_init(EVP_CIPHER_CTX *ctx); -int FIPS_cipher_ctx_cleanup(EVP_CIPHER_CTX *c); -EVP_CIPHER_CTX *FIPS_cipher_ctx_new(void); -void FIPS_cipher_ctx_free(EVP_CIPHER_CTX *ctx); -int FIPS_cipherinit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, - const unsigned char *key, const unsigned char *iv, int enc); -int FIPS_cipher_ctx_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); -int FIPS_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, - const unsigned char *in, unsigned int inl); - -#endif - -#if defined(OPENSSL_FIPSCANISTER) && defined(OPENSSL_FIPSAPI) - -#define EVP_MD_CTX_init FIPS_md_ctx_init -#define EVP_MD_CTX_cleanup FIPS_md_ctx_cleanup -#define EVP_MD_CTX_create FIPS_md_ctx_create -#define EVP_MD_CTX_destroy FIPS_md_ctx_destroy -#define EVP_DigestInit_ex(ctx, type, impl) FIPS_digestinit(ctx, type) -#define EVP_DigestUpdate FIPS_digestupdate -#define EVP_Digest(data, count, md, size, type, impl) \ - FIPS_digest(data, count, md, size, type) -#define EVP_DigestFinal_ex FIPS_digestfinal -#define EVP_MD_CTX_copy_ex FIPS_md_ctx_copy - -#define EVP_CipherInit_ex(ctx, cipher, impl, key, iv, enc) \ - FIPS_cipherinit(ctx, cipher, key, iv, enc) - -#define EVP_CIPHER_CTX_init FIPS_cipher_ctx_init -#define EVP_CIPHER_CTX_cleanup FIPS_cipher_ctx_cleanup -#define EVP_Cipher FIPS_cipher -#define EVP_CIPHER_CTX_ctrl FIPS_cipher_ctx_ctrl - -#else - void EVP_MD_CTX_init(EVP_MD_CTX *ctx); int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx); EVP_MD_CTX *EVP_MD_CTX_create(void); void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx); +__owur int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out,const EVP_MD_CTX *in); +void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags); +void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags); +int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx,int flags); __owur int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl); __owur int EVP_DigestUpdate(EVP_MD_CTX *ctx,const void *d, size_t cnt); __owur int EVP_DigestFinal_ex(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s); __owur int EVP_Digest(const void *data, size_t count, unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl); -#endif - -__owur int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out,const EVP_MD_CTX *in); -void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags); -void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags); -int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx,int flags); __owur int EVP_MD_CTX_copy(EVP_MD_CTX *out,const EVP_MD_CTX *in); __owur int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type); |