Message ID | 20190201153851.28724-1-christian.storm@siemens.com |
---|---|
State | Accepted |
Headers | show |
Series | signature: fix compilation on FreeBSD | expand |
On 01/02/19 16:38, Christian Storm wrote: > FreeBSD has no ENOKEY (required key not available), > hence introduce it in "compat.h". > > Signed-off-by: Christian Storm <christian.storm@siemens.com> > --- > corelib/verify_signature.c | 1 + > include/compat.h | 6 ++++++ > 2 files changed, 7 insertions(+) > > diff --git a/corelib/verify_signature.c b/corelib/verify_signature.c > index dc3fe6d..2141342 100644 > --- a/corelib/verify_signature.c > +++ b/corelib/verify_signature.c > @@ -14,6 +14,7 @@ > #include "swupdate.h" > #include "sslapi.h" > #include "util.h" > +#include "compat.h" > > #define BUFSIZE (1024 * 8) > > diff --git a/include/compat.h b/include/compat.h > index 2546670..eed7dc2 100644 > --- a/include/compat.h > +++ b/include/compat.h > @@ -36,6 +36,12 @@ > */ > #define ENODATA ENOATTR > > +/* > + * Define ENOKEY (required key not available) as > + * on Linux since FreeBSD has no such definition. > + */ > +#define ENOKEY 126 > + > /* > * The BSDs don't define this while Linux does. > */ > Acked-by: Stefano Babic <sbabic@denx.de> Best regards, Stefano Babic
Hi Christian, On 02/02/19 17:51, Stefano Babic wrote: > > > On 01/02/19 16:38, Christian Storm wrote: >> FreeBSD has no ENOKEY (required key not available), >> hence introduce it in "compat.h". >> >> Signed-off-by: Christian Storm <christian.storm@siemens.com> >> --- >> corelib/verify_signature.c | 1 + >> include/compat.h | 6 ++++++ >> 2 files changed, 7 insertions(+) >> >> diff --git a/corelib/verify_signature.c b/corelib/verify_signature.c >> index dc3fe6d..2141342 100644 >> --- a/corelib/verify_signature.c >> +++ b/corelib/verify_signature.c >> @@ -14,6 +14,7 @@ >> #include "swupdate.h" >> #include "sslapi.h" >> #include "util.h" >> +#include "compat.h" >> >> #define BUFSIZE (1024 * 8) >> >> diff --git a/include/compat.h b/include/compat.h >> index 2546670..eed7dc2 100644 >> --- a/include/compat.h >> +++ b/include/compat.h >> @@ -36,6 +36,12 @@ >> */ >> #define ENODATA ENOATTR >> >> +/* >> + * Define ENOKEY (required key not available) as >> + * on Linux since FreeBSD has no such definition. >> + */ >> +#define ENOKEY 126 >> + >> /* >> * The BSDs don't define this while Linux does. >> */ >> > Acked-by: Stefano Babic <sbabic@denx.de> > Anyway, I have recently split the verification in separate files for CMS and RSA, and this change applies now to swupdate_rsa_verify.c. I changed the patch accordingly, I hope it works on FreeBSD. Regards, Stefano
diff --git a/corelib/verify_signature.c b/corelib/verify_signature.c index dc3fe6d..2141342 100644 --- a/corelib/verify_signature.c +++ b/corelib/verify_signature.c @@ -14,6 +14,7 @@ #include "swupdate.h" #include "sslapi.h" #include "util.h" +#include "compat.h" #define BUFSIZE (1024 * 8) diff --git a/include/compat.h b/include/compat.h index 2546670..eed7dc2 100644 --- a/include/compat.h +++ b/include/compat.h @@ -36,6 +36,12 @@ */ #define ENODATA ENOATTR +/* + * Define ENOKEY (required key not available) as + * on Linux since FreeBSD has no such definition. + */ +#define ENOKEY 126 + /* * The BSDs don't define this while Linux does. */
FreeBSD has no ENOKEY (required key not available), hence introduce it in "compat.h". Signed-off-by: Christian Storm <christian.storm@siemens.com> --- corelib/verify_signature.c | 1 + include/compat.h | 6 ++++++ 2 files changed, 7 insertions(+)