summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_time.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-09-22 17:05:33 +0200
committerDr. Stephen Henson <steve@openssl.org>2015-09-22 17:05:33 +0200
commit0d0099ea3b1825fe51bce11e076292e408b55feb (patch)
treeab8f54fdbc335fbe23b15a791a72c478640776ee /crypto/asn1/a_time.c
parentUpdate SEE ALSO sections. (diff)
downloadopenssl-0d0099ea3b1825fe51bce11e076292e408b55feb.tar.xz
openssl-0d0099ea3b1825fe51bce11e076292e408b55feb.zip
Move functions.
Move various functions tagged onto t_x509.c to more appropriate places. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/asn1/a_time.c')
-rw-r--r--crypto/asn1/a_time.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/asn1/a_time.c b/crypto/asn1/a_time.c
index c2b556523b..ff82beb3ee 100644
--- a/crypto/asn1/a_time.c
+++ b/crypto/asn1/a_time.c
@@ -198,3 +198,13 @@ int ASN1_TIME_diff(int *pday, int *psec,
return 0;
return OPENSSL_gmtime_diff(pday, psec, &tm_from, &tm_to);
}
+
+int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm)
+{
+ if (tm->type == V_ASN1_UTCTIME)
+ return ASN1_UTCTIME_print(bp, tm);
+ if (tm->type == V_ASN1_GENERALIZEDTIME)
+ return ASN1_GENERALIZEDTIME_print(bp, tm);
+ BIO_write(bp, "Bad time value", 14);
+ return (0);
+}