1
0
Fork 0
mirror of https://git.sr.ht/~sircmpwn/gmni synced 2024-05-21 14:16:04 +02:00
Commit Graph

15 Commits

Author SHA1 Message Date
Drew DeVault 57064dd01f all: rewrite with BearSSL rather than OpenSSL 2021-03-04 10:59:37 -05:00
René Wagner 863c41dba6 fix display of message on TOFU_FINGERPRINT_MISMATCH
Previously the message was never displayed to users
leaving them with a simple "Error: certificate is untrusted".

This also fixes the display of line numbers in the message.
2021-02-23 10:06:53 -05:00
Giuseppe Lumia 4fbc632b22 Fix OpenBSD compilation errors
Those changes fix the following compilation errors on OpenBSD:

src/tofu.c:128:28: error: format specifies type 'long' but the argument has type
      'time_t' (aka 'long long') [-Werror,-Wformat]
                        "SHA-512", fingerprint, expires);

src/gmnlm.c:341:31: error: missing sentinel in function call
      [-Werror,-Wsentinel]
                execlp("sh", "sh", "-c", cmd);
                                            ^
                                            , NULL
2021-01-07 11:22:23 -05:00
William Casarin 8a83030e5a Fix more strncpy bugs in gmnlm and tofu
>From gcc 9.3.0:

error: '__builtin_strncpy' specified bound 4097 equals destination size
[-Werror=stringop-truncation]

Signed-off-by: William Casarin <jb55@jb55.com>
2020-11-20 11:15:46 -05:00
Giuseppe Lumia cb63b8ddf0 Fix bug on mkdirs calls
On some systems dirname uses a static string for its return value, so
we were calling mkdirs recursively on a string that was continuosly changing.

A check was also added after the `snprintf` to make sure there's no
information loss since there is no limit to the length of the string
returned by `get_data_pathfmt`.

Closes #48.
2020-11-17 10:00:53 -05:00
Martijn Braam 122fb0a9fd Add static library for gmni 2020-10-24 13:41:07 -04:00
Eyal Sawady fa78663748 Add 'd' to download page 2020-10-21 10:12:51 -04:00
Kevin Sangeelee 5d3ae7b7f5 Init known_hosts prior to fopen to avoid segfault. 2020-09-29 17:51:14 -04:00
Drew DeVault dcc0484a8c Fix truncated hashes in known_hosts 2020-09-27 18:06:51 -04:00
Drew DeVault b4fc0c0993 tofu.c: clarify reuse warning 2020-09-27 11:54:32 -04:00
Drew DeVault ce1ef1abde TOFU: verify hostnames 2020-09-27 11:40:49 -04:00
Drew DeVault 0eaf9cc109 TOFU: use ~/.local/share/gemini/known_hosts
The rest of gmni's stuff will remain in ~/.local/share/gmni, but in
order to establish a common location and format for the TOFU file
between Gemini implementations, a more general path is required.
2020-09-26 13:13:41 -04:00
Eyal Sawady 174fbd5d09 Fix memory leaks 2020-09-23 12:55:16 -04:00
Drew DeVault 39339c348f Fix issues with tofu.c 2020-09-21 22:22:18 -04:00
Drew DeVault 02f6af6615 Implement TOFU 2020-09-21 16:06:43 -04:00