From: Dr. Stephen Henson Date: Tue, 20 Nov 2012 15:19:53 +0000 (+0000) Subject: first parameter is difference in days, not years X-Git-Tag: master-post-reformat~1589 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=360ef6769e97f2918ae67a2909951eb8612043ee;p=oweals%2Fopenssl.git first parameter is difference in days, not years --- diff --git a/crypto/asn1/a_time.c b/crypto/asn1/a_time.c index 213756fe16..546d615c7d 100644 --- a/crypto/asn1/a_time.c +++ b/crypto/asn1/a_time.c @@ -217,7 +217,7 @@ static int asn1_time_to_tm(struct tm *tm, const ASN1_TIME *t) return 0; } -int ASN1_TIME_diff(int *pyear, int *psec, +int ASN1_TIME_diff(int *pday, int *psec, const ASN1_TIME *from, const ASN1_TIME *to) { struct tm tm_from, tm_to; @@ -225,5 +225,5 @@ int ASN1_TIME_diff(int *pyear, int *psec, return 0; if (!asn1_time_to_tm(&tm_to, to)) return 0; - return OPENSSL_gmtime_diff(&tm_from, &tm_to, pyear, psec); + return OPENSSL_gmtime_diff(&tm_from, &tm_to, pday, psec); } diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h index de845b26f3..accc1e946b 100644 --- a/crypto/asn1/asn1.h +++ b/crypto/asn1/asn1.h @@ -860,7 +860,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t) ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s, time_t t, int offset_day, long offset_sec); int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str); -int ASN1_TIME_diff(int *pyear, int *psec, +int ASN1_TIME_diff(int *pday, int *psec, const ASN1_TIME *from, const ASN1_TIME *to); DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING)