]> granicus.if.org Git - openssl/commitdiff
Add flags functions which were added to 0.9.8 for fips but not 1.0.0 and
authorDr. Stephen Henson <steve@openssl.org>
Tue, 26 Jan 2010 14:29:06 +0000 (14:29 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 26 Jan 2010 14:29:06 +0000 (14:29 +0000)
later.

crypto/evp/evp.h
crypto/evp/evp_lib.c
crypto/hmac/hmac.c
crypto/hmac/hmac.h
util/libeay.num

index f17730b5e2217bd3d917b8225d0ffed761dd25fa..9064164941932acf860370036233f2959fabe1fc 100644 (file)
@@ -521,6 +521,10 @@ __owur int EVP_BytesToKey(const EVP_CIPHER *type,const EVP_MD *md,
                const unsigned char *salt, const unsigned char *data,
                int datal, int count, unsigned char *key,unsigned char *iv);
 
+void   EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
+void   EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
+int    EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx,int flags);
+
 __owur int     EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher,
                const unsigned char *key, const unsigned char *iv);
 __owur int     EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl,
index 218af7166e75d13030b9b553848efd9bcbcd4d16..40951a04f0c9344c1f45b3780d86b28990aefcd0 100644 (file)
@@ -295,3 +295,18 @@ int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags)
        {
        return (ctx->flags & flags);
        }
+
+void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags)
+       {
+       ctx->flags |= flags;
+       }
+
+void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags)
+       {
+       ctx->flags &= ~flags;
+       }
+
+int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags)
+       {
+       return (ctx->flags & flags);
+       }
index 8c2e36ee7c108c34a1f98366e55935597b0afec4..45015fe754d68a6f18a4d0ab7fbdb2d3e3a101e2 100644 (file)
@@ -209,3 +209,9 @@ unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
        return NULL;
        }
 
+void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags)
+       {
+       EVP_MD_CTX_set_flags(&ctx->i_ctx, flags);
+       EVP_MD_CTX_set_flags(&ctx->o_ctx, flags);
+       EVP_MD_CTX_set_flags(&ctx->md_ctx, flags);
+       }
index bbb340f2091f15dfc5b38585d2727c1f9ec91b47..eedf0a574df8144a4dff862b35a5f17db08300bd 100644 (file)
@@ -101,6 +101,7 @@ unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
                    unsigned int *md_len);
 __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
 
+void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
 
 #ifdef  __cplusplus
 }
index eae7cb4ea2dba1db7314ad305f0a8afa6b8e29db..25556e86dea4b712f36f86997777355ea3d16087 100755 (executable)
@@ -2843,7 +2843,7 @@ FIPS_selftest_failed                    3284      NOEXIST::FUNCTION:
 sk_is_sorted                            3285   EXIST::FUNCTION:
 X509_check_ca                           3286   EXIST::FUNCTION:
 private_idea_set_encrypt_key            3287   NOEXIST::FUNCTION:
-HMAC_CTX_set_flags                      3288   NOEXIST::FUNCTION:
+HMAC_CTX_set_flags                      3288   EXIST::FUNCTION:HMAC
 private_SHA_Init                        3289   NOEXIST::FUNCTION:
 private_CAST_set_key                    3290   NOEXIST::FUNCTION:
 private_RIPEMD160_Init                  3291   NOEXIST::FUNCTION:
@@ -3660,7 +3660,7 @@ ENGINE_load_ssl_client_cert             4046      EXIST::FUNCTION:ENGINE
 ENGINE_load_capi                        4047   EXIST::FUNCTION:ENGINE,STATIC_ENGINE
 OPENSSL_isservice                       4048   EXIST::FUNCTION:
 FIPS_dsa_sig_decode                     4049   NOEXIST::FUNCTION:
-EVP_CIPHER_CTX_clear_flags              4050   NOEXIST::FUNCTION:
+EVP_CIPHER_CTX_clear_flags              4050   EXIST::FUNCTION:
 FIPS_rand_status                        4051   NOEXIST::FUNCTION:
 FIPS_rand_set_key                       4052   NOEXIST::FUNCTION:
 CRYPTO_set_mem_info_functions           4053   NOEXIST::FUNCTION:
@@ -3669,7 +3669,7 @@ int_ERR_set_state_func                  4055      NOEXIST::FUNCTION:
 int_EVP_MD_set_engine_callbacks         4056   NOEXIST::FUNCTION:
 int_CRYPTO_set_do_dynlock_callback      4057   NOEXIST::FUNCTION:
 FIPS_rng_stick                          4058   NOEXIST::FUNCTION:
-EVP_CIPHER_CTX_set_flags                4059   NOEXIST::FUNCTION:
+EVP_CIPHER_CTX_set_flags                4059   EXIST::FUNCTION:
 BN_X931_generate_prime_ex               4060   NOEXIST::FUNCTION:
 FIPS_selftest_check                     4061   NOEXIST::FUNCTION:
 FIPS_rand_set_dt                        4062   NOEXIST::FUNCTION:
@@ -3679,7 +3679,7 @@ RSA_X931_derive_ex                      4065      NOEXIST::FUNCTION:
 FIPS_rsa_new                            4066   NOEXIST::FUNCTION:
 FIPS_rand_bytes                         4067   NOEXIST::FUNCTION:
 fips_cipher_test                        4068   NOEXIST::FUNCTION:
-EVP_CIPHER_CTX_test_flags               4069   NOEXIST::FUNCTION:
+EVP_CIPHER_CTX_test_flags               4069   EXIST::FUNCTION:
 CRYPTO_malloc_debug_init                4070   NOEXIST::FUNCTION:
 CRYPTO_dbg_push_info                    4071   NOEXIST::FUNCTION:
 FIPS_corrupt_rsa_keygen                 4072   NOEXIST::FUNCTION: