summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-06-21 13:42:15 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-06-21 13:42:15 +0000
commit5a0b0230655d5ebf648f8759eb82e34c49dafb50 (patch)
tree6cd71d4b7b5fba84c42540b82d3c30327c253e2c
parentbc4e9e142875a393b20c172df89687120f32bfc9 (diff)
More KNF.
-rw-r--r--lib/libssl/src/crypto/cmac/cm_ameth.c7
-rw-r--r--lib/libssl/src/crypto/cmac/cm_pmeth.c11
-rw-r--r--lib/libssl/src/crypto/cmac/cmac.c10
-rw-r--r--lib/libssl/src/crypto/cmac/cmac.h8
4 files changed, 17 insertions, 19 deletions
diff --git a/lib/libssl/src/crypto/cmac/cm_ameth.c b/lib/libssl/src/crypto/cmac/cm_ameth.c
index a793e65262d..763d161cfe9 100644
--- a/lib/libssl/src/crypto/cmac/cm_ameth.c
+++ b/lib/libssl/src/crypto/cmac/cm_ameth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cm_ameth.c,v 1.4 2014/06/21 12:07:02 miod Exp $ */
+/* $OpenBSD: cm_ameth.c,v 1.5 2014/06/21 13:42:14 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2010.
*/
@@ -10,7 +10,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -77,8 +77,7 @@ cmac_key_free(EVP_PKEY *pkey)
CMAC_CTX_free(cmctx);
}
-const EVP_PKEY_ASN1_METHOD
-cmac_asn1_meth = {
+const EVP_PKEY_ASN1_METHOD cmac_asn1_meth = {
.pkey_id = EVP_PKEY_CMAC,
.pkey_base_id = EVP_PKEY_CMAC,
diff --git a/lib/libssl/src/crypto/cmac/cm_pmeth.c b/lib/libssl/src/crypto/cmac/cm_pmeth.c
index 3010f91acab..5bb391d0533 100644
--- a/lib/libssl/src/crypto/cmac/cm_pmeth.c
+++ b/lib/libssl/src/crypto/cmac/cm_pmeth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cm_pmeth.c,v 1.5 2014/06/21 12:07:02 miod Exp $ */
+/* $OpenBSD: cm_pmeth.c,v 1.6 2014/06/21 13:42:14 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2010.
*/
@@ -10,7 +10,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -100,12 +100,12 @@ pkey_cmac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
return 0;
}
EVP_PKEY_assign(pkey, EVP_PKEY_CMAC, cmkey);
-
+
return 1;
}
static int
-int_update(EVP_MD_CTX *ctx,const void *data,size_t count)
+int_update(EVP_MD_CTX *ctx, const void *data, size_t count)
{
if (!CMAC_Update(ctx->pctx->data, data, count))
return 0;
@@ -193,8 +193,7 @@ pkey_cmac_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value)
return -2;
}
-const EVP_PKEY_METHOD
-cmac_pkey_meth = {
+const EVP_PKEY_METHOD cmac_pkey_meth = {
.pkey_id = EVP_PKEY_CMAC,
.flags = EVP_PKEY_FLAG_SIGCTX_CUSTOM,
diff --git a/lib/libssl/src/crypto/cmac/cmac.c b/lib/libssl/src/crypto/cmac/cmac.c
index b2f77c59bdc..b717f786f15 100644
--- a/lib/libssl/src/crypto/cmac/cmac.c
+++ b/lib/libssl/src/crypto/cmac/cmac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmac.c,v 1.6 2014/06/21 12:07:02 miod Exp $ */
+/* $OpenBSD: cmac.c,v 1.7 2014/06/21 13:42:14 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
@@ -10,7 +10,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -217,7 +217,7 @@ CMAC_Update(CMAC_CTX *ctx, const void *in, size_t dlen)
return 1;
data += nleft;
/* Else not final block so encrypt it */
- if (!EVP_Cipher(&ctx->cctx, ctx->tbl, ctx->last_block,bl))
+ if (!EVP_Cipher(&ctx->cctx, ctx->tbl, ctx->last_block, bl))
return 0;
}
/* Encrypt all but one of the complete blocks left */
@@ -257,7 +257,7 @@ CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen)
out[i] = ctx->last_block[i] ^ ctx->k2[i];
}
if (!EVP_Cipher(&ctx->cctx, out, out, bl)) {
- OPENSSL_cleanse(out, bl);
+ OPENSSL_cleanse(out, bl);
return 0;
}
return 1;
@@ -272,7 +272,7 @@ CMAC_resume(CMAC_CTX *ctx)
* which is the last IV (or all zeroes if no last encrypted block).
* The last block has not been modified since CMAC_final().
* So reinitialising using the last decrypted block will allow
- * CMAC to continue after calling CMAC_Final().
+ * CMAC to continue after calling CMAC_Final().
*/
return EVP_EncryptInit_ex(&ctx->cctx, NULL, NULL, NULL, ctx->tbl);
}
diff --git a/lib/libssl/src/crypto/cmac/cmac.h b/lib/libssl/src/crypto/cmac/cmac.h
index 10ae543f41c..cb6d64b02f4 100644
--- a/lib/libssl/src/crypto/cmac/cmac.h
+++ b/lib/libssl/src/crypto/cmac/cmac.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmac.h,v 1.2 2014/06/12 15:49:28 deraadt Exp $ */
+/* $OpenBSD: cmac.h,v 1.3 2014/06/21 13:42:14 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
@@ -10,7 +10,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -70,8 +70,8 @@ void CMAC_CTX_free(CMAC_CTX *ctx);
EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx);
int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in);
-int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,
- const EVP_CIPHER *cipher, ENGINE *impl);
+int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,
+ const EVP_CIPHER *cipher, ENGINE *impl);
int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen);
int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen);
int CMAC_resume(CMAC_CTX *ctx);