summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/crypto/asn1/x_algor.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2014-04-18 11:20:32 +0000
committerjsing <jsing@openbsd.org>2014-04-18 11:20:32 +0000
commita787b3fa7629e36c26e19030f7ffd0f10e3eb43f (patch)
tree7eb63a496768804639f63b64a85a10b26b3ee0c9 /lib/libssl/src/crypto/asn1/x_algor.c
parentstop mentioning altq (diff)
downloadwireguard-openbsd-a787b3fa7629e36c26e19030f7ffd0f10e3eb43f.tar.xz
wireguard-openbsd-a787b3fa7629e36c26e19030f7ffd0f10e3eb43f.zip
More KNF.
Diffstat (limited to 'lib/libssl/src/crypto/asn1/x_algor.c')
-rw-r--r--lib/libssl/src/crypto/asn1/x_algor.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/libssl/src/crypto/asn1/x_algor.c b/lib/libssl/src/crypto/asn1/x_algor.c
index 7ae473485c1..65f81e86926 100644
--- a/lib/libssl/src/crypto/asn1/x_algor.c
+++ b/lib/libssl/src/crypto/asn1/x_algor.c
@@ -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
@@ -66,8 +66,8 @@ ASN1_SEQUENCE(X509_ALGOR) = {
ASN1_OPT(X509_ALGOR, parameter, ASN1_ANY)
} ASN1_SEQUENCE_END(X509_ALGOR)
-ASN1_ITEM_TEMPLATE(X509_ALGORS) =
- ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, algorithms, X509_ALGOR)
+ASN1_ITEM_TEMPLATE(X509_ALGORS) =
+ ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, algorithms, X509_ALGOR)
ASN1_ITEM_TEMPLATE_END(X509_ALGORS)
IMPLEMENT_ASN1_FUNCTIONS(X509_ALGOR)
@@ -77,7 +77,8 @@ IMPLEMENT_ASN1_DUP_FUNCTION(X509_ALGOR)
IMPLEMENT_STACK_OF(X509_ALGOR)
IMPLEMENT_ASN1_SET_OF(X509_ALGOR)
-int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval)
+int
+X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval)
{
if (!alg)
return 0;
@@ -93,20 +94,20 @@ int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval)
alg->algorithm = aobj;
}
if (ptype == 0)
- return 1;
+ return 1;
if (ptype == V_ASN1_UNDEF) {
if (alg->parameter) {
ASN1_TYPE_free(alg->parameter);
alg->parameter = NULL;
}
- }
- else
+ } else
ASN1_TYPE_set(alg->parameter, ptype, pval);
return 1;
}
-void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
- X509_ALGOR *algor)
+void
+X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
+ X509_ALGOR *algor)
{
if (paobj)
*paobj = algor->algorithm;
@@ -114,8 +115,7 @@ void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
if (algor->parameter == NULL) {
*pptype = V_ASN1_UNDEF;
return;
- }
- else
+ } else
*pptype = algor->parameter->type;
if (ppval)
*ppval = algor->parameter->value.ptr;
@@ -124,7 +124,8 @@ void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
/* Set up an X509_ALGOR DigestAlgorithmIdentifier from an EVP_MD */
-void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md)
+void
+X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md)
{
int param_type;
@@ -134,5 +135,4 @@ void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md)
param_type = V_ASN1_NULL;
X509_ALGOR_set0(alg, OBJ_nid2obj(EVP_MD_type(md)), param_type, NULL);
-
}