If EVP_PKEY structure contains an ENGINE the key is ENGINE specific and
[openssl.git] / crypto / evp / evp_lib.c
index d815bc6d6f15083fbd1dd33f4096375b82466d82..40951a04f0c9344c1f45b3780d86b28990aefcd0 100644 (file)
@@ -159,6 +159,12 @@ int EVP_CIPHER_type(const EVP_CIPHER *ctx)
 
                return NID_des_cfb64;
 
+               case NID_des_ede3_cfb64:
+               case NID_des_ede3_cfb8:
+               case NID_des_ede3_cfb1:
+
+               return NID_des_cfb64;
+
                default:
                /* Check it has an OID and it is valid */
                otmp = OBJ_nid2obj(nid);
@@ -263,6 +269,11 @@ int EVP_MD_size(const EVP_MD *md)
        return md->md_size;
        }
 
+unsigned long EVP_MD_flags(const EVP_MD *md)
+       {
+       return md->flags;
+       }
+
 const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx)
        {
        if (!ctx)
@@ -284,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);
+       }