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
5fff23b9
Commit
5fff23b9
authored
Mar 26, 2014
by
Paul Bakker
Browse files
x509_get_current_time() uses localtime_r() to prevent thread issues
parent
4c284c91
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
ChangeLog
ChangeLog
+1
-0
library/x509.c
library/x509.c
+9
-9
No files found.
ChangeLog
View file @
5fff23b9
...
...
@@ -59,6 +59,7 @@ Bugfix
* ssl_handshake_init() was leaving dirty pointers in subcontexts if malloc
of one of them failed
* Fix typo in rsa_copy() that impacted PKCS#1 v2 contexts
* x509_get_current_time() uses localtime_r() to prevent thread issues
= PolarSSL 1.3.4 released on 2014-01-27
Features
...
...
library/x509.c
View file @
5fff23b9
...
...
@@ -636,18 +636,18 @@ static void x509_get_current_time( x509_time *now )
now
->
min
=
st
.
wMinute
;
now
->
sec
=
st
.
wSecond
;
#else
struct
tm
*
lt
;
struct
tm
lt
;
time_t
tt
;
tt
=
time
(
NULL
);
lt
=
localtime
(
&
tt
);
now
->
year
=
lt
->
tm_year
+
1900
;
now
->
mon
=
lt
->
tm_mon
+
1
;
now
->
day
=
lt
->
tm_mday
;
now
->
hour
=
lt
->
tm_hour
;
now
->
min
=
lt
->
tm_min
;
now
->
sec
=
lt
->
tm_sec
;
localtime
_r
(
&
tt
,
&
lt
);
now
->
year
=
lt
.
tm_year
+
1900
;
now
->
mon
=
lt
.
tm_mon
+
1
;
now
->
day
=
lt
.
tm_mday
;
now
->
hour
=
lt
.
tm_hour
;
now
->
min
=
lt
.
tm_min
;
now
->
sec
=
lt
.
tm_sec
;
#endif
}
...
...
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