Skip to content

Commit

Permalink
Add default ASN1 handling to support FIPS.
Browse files Browse the repository at this point in the history
  • Loading branch information
snhenson committed May 29, 2011
1 parent 04dc5a9 commit 9f375a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crypto/evp/evp_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type)

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);
Expand All @@ -78,6 +80,8 @@ int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type)

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);
Expand Down

0 comments on commit 9f375a7

Please sign in to comment.