summaryrefslogtreecommitdiff
path: root/src/analysis/db/keymgn.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/db/keymgn.h')
-rw-r--r--src/analysis/db/keymgn.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/analysis/db/keymgn.h b/src/analysis/db/keymgn.h
index 4aa33db..be6bf5e 100644
--- a/src/analysis/db/keymgn.h
+++ b/src/analysis/db/keymgn.h
@@ -26,12 +26,25 @@
#include <stdbool.h>
+#include <openssl/rsa.h>
+/* Taille des clefs RSA */
+#define RSA_USED_SIZE (2048 / 8)
+
/* S'assure que l'utilisateur dispose de clefs RSA. */
bool ensure_user_has_rsa_keys(void);
+/* Charge une clef RSA à partir d'un fichier PEM. */
+RSA *load_rsa_key(const char *, bool);
+
+/* Signe une empreinte MD5 à l'aide d'une clef RSA. */
+bool sign_md5_hash(RSA *, const unsigned char *, unsigned char *);
+
+/* Vérifie la signature d'une empreinte MD5 avec une clef RSA. */
+bool verify_md5_hash(RSA *, const unsigned char *, unsigned char *);
+
#endif /* _ANALYSIS_DB_KEYMGN_H */