Skip to content

Commit

Permalink
refactor(device): sign certificates with SHA256
Browse files Browse the repository at this point in the history
Emulate KDE Connect by specifying that certificates should be signed
with SHA256 (`GNUTLS_DIG_SHA256`).
  • Loading branch information
andyholmes committed Sep 25, 2023
1 parent c4bb81c commit b06aa03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libvalent/device/valent-certificate.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ valent_certificate_generate (const char *cert_path,
}

/* Sign and export the certificate */
if ((rc = gnutls_x509_crt_sign (crt, crt, privkey)) != GNUTLS_E_SUCCESS ||
if ((rc = gnutls_x509_crt_sign2 (crt, crt, privkey, GNUTLS_DIG_SHA256, 0)) != GNUTLS_E_SUCCESS ||
(rc = gnutls_x509_crt_export2 (crt, GNUTLS_X509_FMT_PEM, &out)) != GNUTLS_E_SUCCESS)
{
g_set_error (error,
Expand Down

0 comments on commit b06aa03

Please sign in to comment.