Skip to content

Commit 3ba2e1c

Browse files
authored
Merge pull request #4334 from Tiboris/jose
jose: Add Makefile for jose v10
2 parents ee6a081 + 589e39b commit 3ba2e1c

File tree

2 files changed

+107
-0
lines changed

2 files changed

+107
-0
lines changed

libs/jose/Makefile

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#
2+
# Author: Tibor Dudlák
3+
#
4+
# This is free software, licensed under the GNU General Public License v2.
5+
# See /LICENSE for more information.
6+
#
7+
8+
include $(TOPDIR)/rules.mk
9+
10+
PKG_NAME:=jose
11+
PKG_VERSION:=10
12+
PKG_RELEASE:=1
13+
14+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15+
PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
16+
PKG_HASH:=5c9cdcfb535c4d9f781393d7530521c72b1dd81caa9934cab6dd752cc7efcd72
17+
18+
PKG_INSTALL:=1
19+
PKG_BUILD_PARALLEL:=1
20+
21+
PKG_FIXUP:=autoreconf
22+
23+
include $(INCLUDE_DIR)/package.mk
24+
25+
define Package/libjose
26+
SECTION:=libs
27+
TITLE:=Provides a full crypto stack including key generation, signing and encryption.
28+
DEPENDS:=+zlib +jansson +libopenssl +libpthread
29+
URL:=https://github.com/latchset/jose
30+
MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
31+
endef
32+
33+
define Package/jose
34+
SECTION:=utils
35+
TITLE:=Provides a full crypto stack including key generation, signing and encryption.
36+
DEPENDS:=+libjose
37+
URL:=https://github.com/latchset/jose
38+
MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
39+
endef
40+
41+
define Package/jose/description
42+
jose is a command line utility for performing various tasks on JSON
43+
Object Signing and Encryption (JOSE) objects. José provides a full
44+
crypto stack including key generation, signing and encryption.
45+
endef
46+
47+
define Package/libjose/description
48+
libjose is a library for performing various tasks on JSON
49+
Object Signing and Encryption (JOSE) objects. José provides a full
50+
crypto stack including key generation, signing and encryption.
51+
endef
52+
53+
define Build/InstallDev
54+
$(INSTALL_DIR) $(1)/usr/lib
55+
$(INSTALL_DIR) $(1)/usr/include
56+
$(INSTALL_DIR) $(1)/usr/include/$(PKG_NAME)
57+
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
58+
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so* $(1)/usr/lib
59+
$(CP) $(PKG_INSTALL_DIR)/usr/include/$(PKG_NAME)/*.h $(1)/usr/include/$(PKG_NAME)
60+
$(CP) $(PKG_BUILD_DIR)/*.pc $(1)/usr/lib/pkgconfig
61+
endef
62+
63+
define Package/libjose/install
64+
$(INSTALL_DIR) $(1)/usr/lib
65+
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so* $(1)/usr/lib/
66+
endef
67+
68+
define Package/jose/install
69+
$(INSTALL_DIR) $(1)/usr/bin
70+
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
71+
endef
72+
73+
$(eval $(call BuildPackage,libjose))
74+
$(eval $(call BuildPackage,jose))
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
From 198f7207427ad7f569aa3592ea16e2bb400db040 Mon Sep 17 00:00:00 2001
2+
From: Nathaniel McCallum <npmccallum@redhat.com>
3+
Date: Fri, 29 Sep 2017 14:49:57 -0400
4+
Subject: [PATCH] Fix minor FILE* leak
5+
6+
---
7+
cmd/jwe/pwd.h | 5 ++++-
8+
1 file changed, 4 insertions(+), 1 deletion(-)
9+
10+
diff --git a/cmd/jwe/pwd.h b/cmd/jwe/pwd.h
11+
index 0b5be54..2f021eb 100644
12+
--- a/cmd/jwe/pwd.h
13+
+++ b/cmd/jwe/pwd.h
14+
@@ -57,8 +57,10 @@ jwe_getpass(const char *prompt)
15+
nf.c_lflag &= ~ECHO;
16+
nf.c_lflag |= ECHONL;
17+
18+
- if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0)
19+
+ if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0) {
20+
+ fclose(tty);
21+
return NULL;
22+
+ }
23+
24+
fprintf(tty, "%s", prompt);
25+
26+
@@ -72,6 +74,7 @@ jwe_getpass(const char *prompt)
27+
}
28+
29+
tcsetattr(fileno(tty), TCSANOW, &of);
30+
+ fclose(tty);
31+
return pwd;
32+
}
33+
#endif

0 commit comments

Comments
 (0)