Upstream has released 3.2.11, which contains security fixes.
The diff below updates the port I sent earlier to 3.2.11.
Only the version and distinfo change.
Ok to import?
On Tue, Nov 24, 2026 at 04:10:28PM +0800, Kevin Lo wrote:
>
> Ping
>
> On Wed, Nov 18, 2026 at 09:45:04AM +0800, Kevin Lo wrote:
> > Hi,
> >
> > Attached is a new port, devel/libosdp, an OSDP library.
> > Tested on amd64 over a real RS-485 link using two USB to RS-485
> > adapters (uftdi(4) and uchcom(4)) , CP and PD both on OpenBSD,
> > with and without secure channel.
> >
> > >From pkg/DESCR:
> >
> > Libosdp is a cross-platform open source implementation of IEC 60839-11-5
> > Open Supervised Device Protocol (OSDP). The protocol is intended to improve
> > interoperability among access control and security products.
> > It supports Secure Channel (SC) for encrypted and authenticated
> > communication
> > between configured devices.
> >
> > ok?
>
Index: devel/libosdp/Makefile
===================================================================
RCS file: devel/libosdp/Makefile
diff -N devel/libosdp/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ devel/libosdp/Makefile 25 Nov 2026 00:42:44 -0000
@@ -0,0 +1,24 @@
+COMMENT = Open Supervised Device Protocol library
+
+V = 3.2.11
+PKGNAME = libosdp-${V}
+
+DIST_TUPLE += github osdp-dev libosdp v${V} .
+DIST_TUPLE += github osdp-dev c-utils
33c08a2bf9ff7fb295677c28174180dec690270a ./utils
+
+SHARED_LIBS = osdp 0.0
+
+CATEGORIES = devel
+
+HOMEPAGE = https://osdp.dev/
+
+MAINTAINER = Kevin Lo <[email protected]>
+
+# Apache-2.0
+PERMIT_PACKAGE= Yes
+
+WANTLIB = crypto
+
+MODULES = devel/cmake
+
+.include <bsd.port.mk>
Index: devel/libosdp/distinfo
===================================================================
RCS file: devel/libosdp/distinfo
diff -N devel/libosdp/distinfo
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ devel/libosdp/distinfo 25 Nov 2026 00:42:44 -0000
@@ -0,0 +1,4 @@
+SHA256 (osdp-dev-c-utils-33c08a2bf9ff7fb295677c28174180dec690270a.tar.gz) =
YZtTebzHeCzEywudrVJ6v4mrgLvQsVTE9ItPzdiE/Kw=
+SHA256 (osdp-dev-libosdp-v3.2.11.tar.gz) =
7RqhVZRWPQxO3R+rcFXsgwu6Qf3U1jcU0HH2KyGmi1M=
+SIZE (osdp-dev-c-utils-33c08a2bf9ff7fb295677c28174180dec690270a.tar.gz) =
1172198
+SIZE (osdp-dev-libosdp-v3.2.11.tar.gz) = 208130
Index: devel/libosdp/patches/patch-misc_libosdp_pc_in
===================================================================
RCS file: devel/libosdp/patches/patch-misc_libosdp_pc_in
diff -N devel/libosdp/patches/patch-misc_libosdp_pc_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ devel/libosdp/patches/patch-misc_libosdp_pc_in 25 Nov 2026 00:42:44
-0000
@@ -0,0 +1,11 @@
+Index: misc/libosdp.pc.in
+--- misc/libosdp.pc.in.orig
++++ misc/libosdp.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-includedir=${prefix}/include
++includedir=${prefix}/include/libosdp
+ libdir=${exec_prefix}/lib
+
+ Name: @PROJECT_NAME@
Index: devel/libosdp/patches/patch-utils_src_utils_c
===================================================================
RCS file: devel/libosdp/patches/patch-utils_src_utils_c
diff -N devel/libosdp/patches/patch-utils_src_utils_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ devel/libosdp/patches/patch-utils_src_utils_c 25 Nov 2026 00:42:44
-0000
@@ -0,0 +1,31 @@
+Index: utils/src/utils.c
+--- utils/src/utils.c.orig
++++ utils/src/utils.c
+@@ -46,6 +46,9 @@ __weak uint32_t rand_u32(void)
+ x ^= x << 5;
+ s_state = x ? x : 1u;
+ return x;
++
++#elif defined(__OpenBSD__)
++ return arc4random();
+ #else
+ return (uint32_t)rand();
+ #endif
+@@ -180,7 +183,7 @@ int add_iso8601_utc_datetime(char* buf, size_t size)
+ return r;
+ }
+
+-#elif defined(__linux__) || defined(__APPLE__) || defined(ESP_PLATFORM)
++#elif defined(__linux__) || defined(__APPLE__) || defined (__OpenBSD__) ||
defined(ESP_PLATFORM)
+
+ #include <sys/time.h>
+ #include <time.h>
+@@ -348,7 +351,7 @@ tick_t millis_since(tick_t last)
+ return millis_now() - last;
+ }
+
+-#if (defined(__linux__) || defined(__APPLE__)) && defined(__GLIBC__)
++#if (defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__)) &&
defined(__GLIBC__)
+ #include <execinfo.h>
+ void dump_trace(void)
+ {
Index: devel/libosdp/pkg/DESCR
===================================================================
RCS file: devel/libosdp/pkg/DESCR
diff -N devel/libosdp/pkg/DESCR
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ devel/libosdp/pkg/DESCR 25 Nov 2026 00:42:44 -0000
@@ -0,0 +1,5 @@
+Libosdp is a cross-platform open source implementation of IEC 60839-11-5
+Open Supervised Device Protocol (OSDP). The protocol is intended to improve
+interoperability among access control and security products.
+It supports Secure Channel (SC) for encrypted and authenticated communication
+between configured devices.
Index: devel/libosdp/pkg/PLIST
===================================================================
RCS file: devel/libosdp/pkg/PLIST
diff -N devel/libosdp/pkg/PLIST
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ devel/libosdp/pkg/PLIST 25 Nov 2026 00:42:44 -0000
@@ -0,0 +1,13 @@
+include/libosdp/
+include/libosdp/osdp.h
+include/libosdp/osdp.hpp
+include/libosdp/osdp_export.h
+lib/cmake/
+lib/cmake/libosdp/
+lib/cmake/libosdp/LibOSDPConfig.cmake
+lib/cmake/libosdp/LibOSDPConfigVersion.cmake
+lib/cmake/libosdp/LibOSDPTargets${MODCMAKE_BUILD_SUFFIX}
+lib/cmake/libosdp/LibOSDPTargets.cmake
+@lib lib/libosdp.so.${LIBosdp_VERSION}
+@static-lib lib/libosdpstatic.a
+lib/pkgconfig/libosdp.pc