1 #include <libex/file.h>
4 int main (int argc
, const char *argv
[]) {
7 unsigned char *sig
= NULL
;
9 if (2 != argc
) return 1;
13 if (0 == ssl_load_priv_fl("./private.pem", "password", sk
) && 0 == ssl_load_pub_fl("./public.pem", pk
)) {
14 str
= load_all_file(argv
[1], 32, 4096);
15 if (0 == ssl_sign((const unsigned char*)str
->ptr
, str
->len
, &sig
, &siglen
, 0, sk
)) {
16 if (0 == ssl_verify((const unsigned char*)str
->ptr
, str
->len
, sig
, siglen
, 0, pk
))