forked from crtsh/go-x509lint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
asn1_time_to_tm.patch
44 lines (39 loc) · 1.15 KB
/
asn1_time_to_tm.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
diff --git a/asn1_time.c b/asn1_time.c
index 5521f5a..026b4b8 100644
--- a/asn1_time.c
+++ b/asn1_time.c
@@ -122,7 +122,7 @@ static bool time_to_tm(ASN1_TIME *t, bool general, struct tm *tm)
return true;
}
-bool asn1_time_to_tm(ASN1_TIME *time, struct tm *tm)
+bool _x509lint_asn1_time_to_tm(ASN1_TIME *time, struct tm *tm)
{
bool general = false;
diff --git a/asn1_time.h b/asn1_time.h
index d2505d4..d4c3803 100644
--- a/asn1_time.h
+++ b/asn1_time.h
@@ -16,7 +16,7 @@
*
* Returns true on success and false on failure.
*/
-bool asn1_time_to_tm(ASN1_TIME *time, struct tm *tm);
+bool _x509lint_asn1_time_to_tm(ASN1_TIME *time, struct tm *tm);
#endif
diff --git a/checks.c b/checks.c
index 7d8ec51..a4888b7 100644
--- a/checks.c
+++ b/checks.c
@@ -1354,11 +1354,11 @@ static void CheckTime(X509 *x509, struct tm *tm_before, struct tm *tm_after, Cer
ASN1_TIME *after = X509_get_notAfter(x509);
bool error = false;
- if (!asn1_time_to_tm(before, tm_before))
+ if (!_x509lint_asn1_time_to_tm(before, tm_before))
{
error = true;
}
- if (!asn1_time_to_tm(after, tm_after))
+ if (!_x509lint_asn1_time_to_tm(after, tm_after))
{
error = true;
}