Skip to content

Commit 5906f44

Browse files
committed
mox-pkcs11: add new package
Library for using built-in ECDSA key in devices based on Turris MOX for PKCS11 authentication Signed-off-by: Tomáš Macholda <[email protected]>
1 parent 4845c95 commit 5906f44

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

utils/mox-pkcs11/Makefile

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#
2+
## Copyright (C) 2020, 2025 CZ.NIC z.s.p.o. (https://www.nic.cz/)
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:=mox-pkcs11
11+
PKG_VERSION:=2.0
12+
PKG_RELEASE:=1
13+
14+
PKG_SOURCE_PROTO:=git
15+
PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/mox-pkcs11.git
16+
PKG_MIRROR_HASH:=424b5247288310c6a71b7babed201dc153c58fca73241530254d2cbc84f1b4ef
17+
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
18+
19+
PKG_MAINTAINER:=CZ.NIC <[email protected]>
20+
PKG_LICENSE:=GPL-3.0-or-later
21+
22+
include $(INCLUDE_DIR)/package.mk
23+
24+
define Package/mox-pkcs11
25+
TITLE:=MOX PKCS11
26+
DEPENDS:=@(TARGET_mvebu_cortexa53_DEVICE_ripe_atlas-v5||TARGET_mvebu_cortexa53_DEVICE_cznic_turris-mox) +libopenssl +libkeyutils
27+
endef
28+
29+
define Package/mox-pkcs11/description
30+
Contains PKCS11 module that suppports Turris MOX internal ECDSA key
31+
endef
32+
33+
define Build/Compile
34+
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(FPIC) -o $(PKG_BUILD_DIR)/libmox-pkcs11.so $(PKG_BUILD_DIR)/mox-pkcs11.c -lcrypto -lkeyutils -Wall -shared
35+
endef
36+
37+
define Package/mox-pkcs11/install
38+
$(INSTALL_DIR) $(1)/usr/lib
39+
$(CP) $(PKG_BUILD_DIR)/libmox-pkcs11.so $(1)/usr/lib
40+
$(INSTALL_DIR) $(1)/usr/lib/pkcs11
41+
$(LN) ../libmox-pkcs11.so $(1)/usr/lib/pkcs11/
42+
endef
43+
44+
$(eval $(call BuildPackage,mox-pkcs11))

0 commit comments

Comments
 (0)