summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/asn1/x_algor.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-04-18 00:10:08 +0000
committertedu <tedu@openbsd.org>2014-04-18 00:10:08 +0000
commit93a4b0e0f3ae3e8eff3c1093d39e0621b990cd51 (patch)
treedab0be254caa8cf5e55b6d2b1432898d7045e6a8 /lib/libcrypto/asn1/x_algor.c
parentWhen iterating through fabric ports, start at our own port ID, so we can (diff)
downloadwireguard-openbsd-93a4b0e0f3ae3e8eff3c1093d39e0621b990cd51.tar.xz
wireguard-openbsd-93a4b0e0f3ae3e8eff3c1093d39e0621b990cd51.zip
putting most of the braces in the right column is the very least we can do.
Diffstat (limited to 'lib/libcrypto/asn1/x_algor.c')
-rw-r--r--lib/libcrypto/asn1/x_algor.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/libcrypto/asn1/x_algor.c b/lib/libcrypto/asn1/x_algor.c
index 274e456c738..6f6fbb112a5 100644
--- a/lib/libcrypto/asn1/x_algor.c
+++ b/lib/libcrypto/asn1/x_algor.c
@@ -78,60 +78,60 @@ 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)
- {
+{
if (!alg)
return 0;
if (ptype != V_ASN1_UNDEF)
- {
+ {
if (alg->parameter == NULL)
alg->parameter = ASN1_TYPE_new();
if (alg->parameter == NULL)
return 0;
- }
+ }
if (alg)
- {
+ {
if (alg->algorithm)
ASN1_OBJECT_free(alg->algorithm);
alg->algorithm = aobj;
- }
+ }
if (ptype == 0)
return 1;
if (ptype == V_ASN1_UNDEF)
- {
+ {
if (alg->parameter)
- {
+ {
ASN1_TYPE_free(alg->parameter);
alg->parameter = NULL;
- }
}
+ }
else
ASN1_TYPE_set(alg->parameter, ptype, pval);
return 1;
- }
+}
void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
X509_ALGOR *algor)
- {
+{
if (paobj)
*paobj = algor->algorithm;
if (pptype)
- {
+ {
if (algor->parameter == NULL)
- {
+ {
*pptype = V_ASN1_UNDEF;
return;
- }
+ }
else
*pptype = algor->parameter->type;
if (ppval)
*ppval = algor->parameter->value.ptr;
- }
}
+}
/* Set up an X509_ALGOR DigestAlgorithmIdentifier from an EVP_MD */
void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md)
- {
+{
int param_type;
if (md->flags & EVP_MD_FLAG_DIGALGID_ABSENT)
@@ -141,4 +141,4 @@ void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md)
X509_ALGOR_set0(alg, OBJ_nid2obj(EVP_MD_type(md)), param_type, NULL);
- }
+}