summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3/v3_pku.c
diff options
context:
space:
mode:
authorjsing <>2014-05-26 12:10:11 +0000
committerjsing <>2014-05-26 12:10:11 +0000
commit0995a92809472b446ca1bf18277538657c614595 (patch)
tree1adbb75e5e24e4d93c2bd12fb748f9eb26f2d739 /src/lib/libcrypto/x509v3/v3_pku.c
parent1918fecccdef550d51f6267a095575731f873b2b (diff)
downloadopenbsd-0995a92809472b446ca1bf18277538657c614595.tar.gz
openbsd-0995a92809472b446ca1bf18277538657c614595.tar.bz2
openbsd-0995a92809472b446ca1bf18277538657c614595.zip
KNF.
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_pku.c')
-rw-r--r--src/lib/libcrypto/x509v3/v3_pku.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_pku.c b/src/lib/libcrypto/x509v3/v3_pku.c
index 076f3ff48e..860b247159 100644
--- a/src/lib/libcrypto/x509v3/v3_pku.c
+++ b/src/lib/libcrypto/x509v3/v3_pku.c
@@ -10,7 +10,7 @@
10 * are met: 10 * are met:
11 * 11 *
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 14 *
15 * 2. Redistributions in binary form must reproduce the above copyright 15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in 16 * notice, this list of conditions and the following disclaimer in
@@ -62,16 +62,17 @@
62#include <openssl/asn1t.h> 62#include <openssl/asn1t.h>
63#include <openssl/x509v3.h> 63#include <openssl/x509v3.h>
64 64
65static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, PKEY_USAGE_PERIOD *usage, BIO *out, int indent); 65static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method,
66 PKEY_USAGE_PERIOD *usage, BIO *out, int indent);
66/* 67/*
67static PKEY_USAGE_PERIOD *v2i_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *values); 68static PKEY_USAGE_PERIOD *v2i_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *values);
68*/ 69*/
69const X509V3_EXT_METHOD v3_pkey_usage_period = { 70const X509V3_EXT_METHOD v3_pkey_usage_period = {
70NID_private_key_usage_period, 0, ASN1_ITEM_ref(PKEY_USAGE_PERIOD), 71 NID_private_key_usage_period, 0, ASN1_ITEM_ref(PKEY_USAGE_PERIOD),
710,0,0,0, 72 0, 0, 0, 0,
720,0,0,0, 73 0, 0, 0, 0,
73(X509V3_EXT_I2R)i2r_PKEY_USAGE_PERIOD, NULL, 74 (X509V3_EXT_I2R)i2r_PKEY_USAGE_PERIOD, NULL,
74NULL 75 NULL
75}; 76};
76 77
77ASN1_SEQUENCE(PKEY_USAGE_PERIOD) = { 78ASN1_SEQUENCE(PKEY_USAGE_PERIOD) = {
@@ -81,16 +82,18 @@ ASN1_SEQUENCE(PKEY_USAGE_PERIOD) = {
81 82
82IMPLEMENT_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD) 83IMPLEMENT_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD)
83 84
84static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, 85static int
85 PKEY_USAGE_PERIOD *usage, BIO *out, int indent) 86i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, PKEY_USAGE_PERIOD *usage,
87 BIO *out, int indent)
86{ 88{
87 BIO_printf(out, "%*s", indent, ""); 89 BIO_printf(out, "%*s", indent, "");
88 if(usage->notBefore) { 90 if (usage->notBefore) {
89 BIO_write(out, "Not Before: ", 12); 91 BIO_write(out, "Not Before: ", 12);
90 ASN1_GENERALIZEDTIME_print(out, usage->notBefore); 92 ASN1_GENERALIZEDTIME_print(out, usage->notBefore);
91 if(usage->notAfter) BIO_write(out, ", ", 2); 93 if (usage->notAfter)
94 BIO_write(out, ", ", 2);
92 } 95 }
93 if(usage->notAfter) { 96 if (usage->notAfter) {
94 BIO_write(out, "Not After: ", 11); 97 BIO_write(out, "Not After: ", 11);
95 ASN1_GENERALIZEDTIME_print(out, usage->notAfter); 98 ASN1_GENERALIZEDTIME_print(out, usage->notAfter);
96 } 99 }