Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
mbedtls
Commits
0776a437
Commit
0776a437
authored
Apr 11, 2014
by
Manuel Pégourié-Gonnard
Committed by
Paul Bakker
Apr 11, 2014
Browse files
Use UTC to heck certificate validity
parent
52c5af7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
ChangeLog
ChangeLog
+1
-0
library/x509.c
library/x509.c
+2
-2
No files found.
ChangeLog
View file @
0776a437
...
...
@@ -16,6 +16,7 @@ Changes
* x509_crt_info() now prints information about parsed extensions as well
* pk_verify() now returns a specific error code when the signature is valid
but shorter than the supplied length.
* Use UTC time to check certificate validity.
Security
* Avoid potential timing leak in ecdsa_sign() by blinding modular division.
...
...
library/x509.c
View file @
0776a437
...
...
@@ -627,7 +627,7 @@ static void x509_get_current_time( x509_time *now )
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
SYSTEMTIME
st
;
Get
Local
Time
(
&
st
);
Get
System
Time
(
&
st
);
now
->
year
=
st
.
wYear
;
now
->
mon
=
st
.
wMonth
;
...
...
@@ -640,7 +640,7 @@ static void x509_get_current_time( x509_time *now )
time_t
tt
;
tt
=
time
(
NULL
);
local
time_r
(
&
tt
,
&
lt
);
gm
time_r
(
&
tt
,
&
lt
);
now
->
year
=
lt
.
tm_year
+
1900
;
now
->
mon
=
lt
.
tm_mon
+
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment