| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/x509v3/v3_pku.c |
| Source code | Switch to Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | /* | - | ||||||
| 2 | * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. | - | ||||||
| 3 | * | - | ||||||
| 4 | * Licensed under the OpenSSL license (the "License"). You may not use | - | ||||||
| 5 | * this file except in compliance with the License. You can obtain a copy | - | ||||||
| 6 | * in the file LICENSE in the source distribution or at | - | ||||||
| 7 | * https://www.openssl.org/source/license.html | - | ||||||
| 8 | */ | - | ||||||
| 9 | - | |||||||
| 10 | #include <stdio.h> | - | ||||||
| 11 | #include "internal/cryptlib.h" | - | ||||||
| 12 | #include <openssl/asn1.h> | - | ||||||
| 13 | #include <openssl/asn1t.h> | - | ||||||
| 14 | #include <openssl/x509v3.h> | - | ||||||
| 15 | #include "ext_dat.h" | - | ||||||
| 16 | - | |||||||
| 17 | static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, | - | ||||||
| 18 | PKEY_USAGE_PERIOD *usage, BIO *out, | - | ||||||
| 19 | int indent); | - | ||||||
| 20 | - | |||||||
| 21 | const X509V3_EXT_METHOD v3_pkey_usage_period = { | - | ||||||
| 22 | NID_private_key_usage_period, 0, ASN1_ITEM_ref(PKEY_USAGE_PERIOD), | - | ||||||
| 23 | 0, 0, 0, 0, | - | ||||||
| 24 | 0, 0, 0, 0, | - | ||||||
| 25 | (X509V3_EXT_I2R)i2r_PKEY_USAGE_PERIOD, NULL, | - | ||||||
| 26 | NULL | - | ||||||
| 27 | }; | - | ||||||
| 28 | - | |||||||
| 29 | ASN1_SEQUENCE(PKEY_USAGE_PERIOD) = { | - | ||||||
| 30 | ASN1_IMP_OPT(PKEY_USAGE_PERIOD, notBefore, ASN1_GENERALIZEDTIME, 0), | - | ||||||
| 31 | ASN1_IMP_OPT(PKEY_USAGE_PERIOD, notAfter, ASN1_GENERALIZEDTIME, 1) | - | ||||||
| 32 | } ASN1_SEQUENCE_END(PKEY_USAGE_PERIOD) | - | ||||||
| 33 | - | |||||||
| 34 | IMPLEMENT_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD) never executed: end of blocknever executed: return (PKEY_USAGE_PERIOD *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(PKEY_USAGE_PERIOD_it)));never executed: return ASN1_item_i2d((ASN1_VALUE *)a, out, (&(PKEY_USAGE_PERIOD_it)));never executed: return (PKEY_USAGE_PERIOD *)ASN1_item_new((&(PKEY_USAGE_PERIOD_it))); | 0 | ||||||
| 35 | - | |||||||
| 36 | static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, | - | ||||||
| 37 | PKEY_USAGE_PERIOD *usage, BIO *out, | - | ||||||
| 38 | int indent) | - | ||||||
| 39 | { | - | ||||||
| 40 | BIO_printf(out, "%*s", indent, ""); | - | ||||||
| 41 | if (usage->notBefore) {
| 468-674 | ||||||
| 42 | BIO_write(out, "Not Before: ", 12); | - | ||||||
| 43 | ASN1_GENERALIZEDTIME_print(out, usage->notBefore); | - | ||||||
| 44 | if (usage->notAfter)
| 207-467 | ||||||
| 45 | BIO_write(out, ", ", 2); executed 207 times by 1 test: BIO_write(out, ", ", 2);Executed by:
| 207 | ||||||
| 46 | } executed 674 times by 1 test: end of blockExecuted by:
| 674 | ||||||
| 47 | if (usage->notAfter) {
| 436-706 | ||||||
| 48 | BIO_write(out, "Not After: ", 11); | - | ||||||
| 49 | ASN1_GENERALIZEDTIME_print(out, usage->notAfter); | - | ||||||
| 50 | } executed 436 times by 1 test: end of blockExecuted by:
| 436 | ||||||
| 51 | return 1; executed 1142 times by 1 test: return 1;Executed by:
| 1142 | ||||||
| 52 | } | - | ||||||
| Source code | Switch to Preprocessed file |