Skip to content
Snippets Groups Projects
Commit fbdc7b24 authored by Adrien Béraud's avatar Adrien Béraud Committed by Guillaume Roguez
Browse files

crypto: save dh params

Diffie-Hellman parameters can take a few seconds to compute,
during this time a CPU core will be fully used. This leads
to high power consumption on startup, which can be problematic
for mobile devices.

This patch introduces saving DH params to the persistent cache
to avoid regenerating them too often.
The file modification time is used to know the age of the
parameters. DH params can be reused for up to 3 days.

* Intoduce writeTime to know a file modification time
* Introduce to_wstring to convert filenames to the Windows format
* Introduce a DhParams structure to handle serialization

Tuleap: #452
Change-Id: Iaea9cf24d922fc6cfc542f8fa7b0c208ebc141d2
parent b3c8e1b3
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment