X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwgtpkg-xmlsec.c;h=534813307a622157dc5b968250c67365b3fc4555;hb=512e870e35747c6114e0dd5e0d94060b3b3cf6a5;hp=b31a5d0b1027adc87ce0198e02336e373f7b1f65;hpb=c0fc18e47e49dd4e3cc2f09452a19297dad63f9c;p=src%2Fapp-framework-main.git diff --git a/src/wgtpkg-xmlsec.c b/src/wgtpkg-xmlsec.c index b31a5d0..5348133 100644 --- a/src/wgtpkg-xmlsec.c +++ b/src/wgtpkg-xmlsec.c @@ -1,5 +1,5 @@ /* - Copyright 2015 IoT.bzh + Copyright 2015, 2016, 2017 IoT.bzh author: José Bollo @@ -35,7 +35,9 @@ #include "verbose.h" -#include "wgtpkg.h" +#include "wgtpkg-files.h" +#include "wgtpkg-workdir.h" +#include "wgtpkg-xmlsec.h" static int initstatus; static int initdone; @@ -78,7 +80,7 @@ static void *file_open_cb(const char *file) /* read the opened file */ static int file_read_cb(void *context, char *buffer, int len) { - size_t r = fread(buffer, 1, len, (FILE*)context); + size_t r = fread(buffer, 1, (unsigned)len, (FILE*)context); return r ? (int)r : feof((FILE*)context) ? 0 : - 1; } @@ -272,7 +274,7 @@ static const struct { const char *id; const char *xml; } properties[2] = { /* create a signature of 'index' (0 for author, other values for distributors) using the private 'key' (filename) and the certificates 'certs' (filenames) as trusted chain */ -xmlDocPtr xmlsec_create(int index, const char *key, const char **certs) +xmlDocPtr xmlsec_create(unsigned int index, const char *key, const char **certs) { unsigned int i, fc, mask; struct filedesc *fdesc;