vinix-ports / gpgme / context.c
15 lines · 14 sloc · 438 bytes · 652e2126be59ade6d2e16767fe52d8356f24e4c4
Raw
1#include <gpgme.h>
2#include <string.h>
3
4int main(void)
5{
6 gpgme_data_t data;
7 char bytes[5];
8 if (gpgme_check_version("1.24.1") == NULL ||
9 gpgme_data_new_from_mem(&data, "Vinix", sizeof(bytes), 1))
10 return 1;
11 const int failed = gpgme_data_read(data, bytes, sizeof(bytes)) != sizeof(bytes) ||
12 memcmp(bytes, "Vinix", sizeof(bytes)) != 0;
13 gpgme_data_release(data);
14 return failed;
15}
16