| Index: openssl/crypto/evp/evp_lib.c
|
| ===================================================================
|
| --- openssl/crypto/evp/evp_lib.c (revision 105093)
|
| +++ openssl/crypto/evp/evp_lib.c (working copy)
|
| @@ -67,8 +67,6 @@
|
|
|
| if (c->cipher->set_asn1_parameters != NULL)
|
| ret=c->cipher->set_asn1_parameters(c,type);
|
| - else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1)
|
| - ret=EVP_CIPHER_set_asn1_iv(c, type);
|
| else
|
| ret=-1;
|
| return(ret);
|
| @@ -80,8 +78,6 @@
|
|
|
| if (c->cipher->get_asn1_parameters != NULL)
|
| ret=c->cipher->get_asn1_parameters(c,type);
|
| - else if (c->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1)
|
| - ret=EVP_CIPHER_get_asn1_iv(c, type);
|
| else
|
| ret=-1;
|
| return(ret);
|
| @@ -188,6 +184,11 @@
|
| return ctx->cipher->block_size;
|
| }
|
|
|
| +int EVP_Cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl)
|
| + {
|
| + return ctx->cipher->do_cipher(ctx,out,in,inl);
|
| + }
|
| +
|
| const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx)
|
| {
|
| return ctx->cipher;
|
| @@ -198,6 +199,11 @@
|
| return cipher->flags;
|
| }
|
|
|
| +unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx)
|
| + {
|
| + return ctx->cipher->flags;
|
| + }
|
| +
|
| void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx)
|
| {
|
| return ctx->app_data;
|
| @@ -213,6 +219,11 @@
|
| return cipher->iv_len;
|
| }
|
|
|
| +int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx)
|
| + {
|
| + return ctx->cipher->iv_len;
|
| + }
|
| +
|
| int EVP_CIPHER_key_length(const EVP_CIPHER *cipher)
|
| {
|
| return cipher->key_len;
|
| @@ -223,6 +234,11 @@
|
| return ctx->key_len;
|
| }
|
|
|
| +int EVP_CIPHER_nid(const EVP_CIPHER *cipher)
|
| + {
|
| + return cipher->nid;
|
| + }
|
| +
|
| int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx)
|
| {
|
| return ctx->cipher->nid;
|
| @@ -245,11 +261,23 @@
|
|
|
| int EVP_MD_size(const EVP_MD *md)
|
| {
|
| + if (!md)
|
| + {
|
| + EVPerr(EVP_F_EVP_MD_SIZE, EVP_R_MESSAGE_DIGEST_IS_NULL);
|
| + return -1;
|
| + }
|
| return md->md_size;
|
| }
|
|
|
| -const EVP_MD * EVP_MD_CTX_md(const EVP_MD_CTX *ctx)
|
| +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)
|
| + return NULL;
|
| return ctx->digest;
|
| }
|
|
|
|
|