aboutsummaryrefslogtreecommitdiff
path: root/crypto/evp/cmeth_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/evp/cmeth_lib.c')
-rw-r--r--crypto/evp/cmeth_lib.c57
1 files changed, 28 insertions, 29 deletions
diff --git a/crypto/evp/cmeth_lib.c b/crypto/evp/cmeth_lib.c
index a806ec5f9e22..7741f7f15d83 100644
--- a/crypto/evp/cmeth_lib.c
+++ b/crypto/evp/cmeth_lib.c
@@ -45,7 +45,8 @@ EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher)
return NULL;
if ((to = EVP_CIPHER_meth_new(cipher->nid, cipher->block_size,
- cipher->key_len)) != NULL) {
+ cipher->key_len))
+ != NULL) {
CRYPTO_RWLOCK *lock = to->lock;
memcpy(to, cipher, sizeof(*to));
@@ -58,7 +59,7 @@ EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher)
void EVP_CIPHER_meth_free(EVP_CIPHER *cipher)
{
if (cipher == NULL || cipher->origin != EVP_ORIG_METH)
- return;
+ return;
evp_cipher_free_int(cipher);
}
@@ -91,10 +92,10 @@ int EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size)
}
int EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher,
- int (*init) (EVP_CIPHER_CTX *ctx,
- const unsigned char *key,
- const unsigned char *iv,
- int enc))
+ int (*init)(EVP_CIPHER_CTX *ctx,
+ const unsigned char *key,
+ const unsigned char *iv,
+ int enc))
{
if (cipher->init != NULL)
return 0;
@@ -104,10 +105,10 @@ int EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher,
}
int EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher,
- int (*do_cipher) (EVP_CIPHER_CTX *ctx,
- unsigned char *out,
- const unsigned char *in,
- size_t inl))
+ int (*do_cipher)(EVP_CIPHER_CTX *ctx,
+ unsigned char *out,
+ const unsigned char *in,
+ size_t inl))
{
if (cipher->do_cipher != NULL)
return 0;
@@ -117,7 +118,7 @@ int EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher,
}
int EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher,
- int (*cleanup) (EVP_CIPHER_CTX *))
+ int (*cleanup)(EVP_CIPHER_CTX *))
{
if (cipher->cleanup != NULL)
return 0;
@@ -127,8 +128,8 @@ int EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher,
}
int EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher,
- int (*set_asn1_parameters) (EVP_CIPHER_CTX *,
- ASN1_TYPE *))
+ int (*set_asn1_parameters)(EVP_CIPHER_CTX *,
+ ASN1_TYPE *))
{
if (cipher->set_asn1_parameters != NULL)
return 0;
@@ -138,8 +139,8 @@ int EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher,
}
int EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher,
- int (*get_asn1_parameters) (EVP_CIPHER_CTX *,
- ASN1_TYPE *))
+ int (*get_asn1_parameters)(EVP_CIPHER_CTX *,
+ ASN1_TYPE *))
{
if (cipher->get_asn1_parameters != NULL)
return 0;
@@ -149,8 +150,8 @@ int EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher,
}
int EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher,
- int (*ctrl) (EVP_CIPHER_CTX *, int type,
- int arg, void *ptr))
+ int (*ctrl)(EVP_CIPHER_CTX *, int type,
+ int arg, void *ptr))
{
if (cipher->ctrl != NULL)
return 0;
@@ -159,18 +160,17 @@ int EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher,
return 1;
}
-
int (*EVP_CIPHER_meth_get_init(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx,
- const unsigned char *key,
- const unsigned char *iv,
- int enc)
+ const unsigned char *key,
+ const unsigned char *iv,
+ int enc)
{
return cipher->init;
}
int (*EVP_CIPHER_meth_get_do_cipher(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx,
- unsigned char *out,
- const unsigned char *in,
- size_t inl)
+ unsigned char *out,
+ const unsigned char *in,
+ size_t inl)
{
return cipher->do_cipher;
}
@@ -181,21 +181,20 @@ int (*EVP_CIPHER_meth_get_cleanup(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *)
}
int (*EVP_CIPHER_meth_get_set_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *,
- ASN1_TYPE *)
+ ASN1_TYPE *)
{
return cipher->set_asn1_parameters;
}
int (*EVP_CIPHER_meth_get_get_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *,
- ASN1_TYPE *)
+ ASN1_TYPE *)
{
return cipher->get_asn1_parameters;
}
int (*EVP_CIPHER_meth_get_ctrl(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *,
- int type, int arg,
- void *ptr)
+ int type, int arg,
+ void *ptr)
{
return cipher->ctrl;
}
-