diff options
Diffstat (limited to 'src/gmrequest.c')
-rw-r--r-- | src/gmrequest.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c index 7b6414d2..3faa2833 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c | |||
@@ -26,6 +26,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | |||
26 | #include "app.h" /* dataDir_App() */ | 26 | #include "app.h" /* dataDir_App() */ |
27 | #include "embedded.h" | 27 | #include "embedded.h" |
28 | #include "ui/text.h" | 28 | #include "ui/text.h" |
29 | #include "defs.h" | ||
29 | 30 | ||
30 | #include <the_Foundation/file.h> | 31 | #include <the_Foundation/file.h> |
31 | #include <the_Foundation/mutex.h> | 32 | #include <the_Foundation/mutex.h> |
@@ -86,7 +87,7 @@ void serialize_GmResponse(const iGmResponse *d, iStream *outs) { | |||
86 | write32_Stream(outs, d->certFlags); | 87 | write32_Stream(outs, d->certFlags); |
87 | serialize_Date(&d->certValidUntil, outs); | 88 | serialize_Date(&d->certValidUntil, outs); |
88 | serialize_String(&d->certSubject, outs); | 89 | serialize_String(&d->certSubject, outs); |
89 | /* TODO: Include the timestamp. */ | 90 | writeU64_Stream(outs, d->when.ts.tv_sec); |
90 | } | 91 | } |
91 | 92 | ||
92 | void deserialize_GmResponse(iGmResponse *d, iStream *ins) { | 93 | void deserialize_GmResponse(iGmResponse *d, iStream *ins) { |
@@ -96,6 +97,10 @@ void deserialize_GmResponse(iGmResponse *d, iStream *ins) { | |||
96 | d->certFlags = read32_Stream(ins); | 97 | d->certFlags = read32_Stream(ins); |
97 | deserialize_Date(&d->certValidUntil, ins); | 98 | deserialize_Date(&d->certValidUntil, ins); |
98 | deserialize_String(&d->certSubject, ins); | 99 | deserialize_String(&d->certSubject, ins); |
100 | iZap(d->when); | ||
101 | if (version_Stream(ins) >= addedResponseTimestamps_FileVersion) { | ||
102 | d->when.ts.tv_sec = readU64_Stream(ins); | ||
103 | } | ||
99 | } | 104 | } |
100 | 105 | ||
101 | /*----------------------------------------------------------------------------------------------*/ | 106 | /*----------------------------------------------------------------------------------------------*/ |