FreeBSD Bugzilla – Attachment 234482 Details for
Bug 264474
[NEW PORT] security/libpki : OpenCA’s libpki library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch against current ports tree
libpki.patch (text/plain), 11.89 KB, created by
Bruno Damour
on 2022-06-06 08:27:23 UTC
(
hide
)
Description:
Patch against current ports tree
Filename:
MIME Type:
Creator:
Bruno Damour
Created:
2022-06-06 08:27:23 UTC
Size:
11.89 KB
patch
obsolete
>From 387e2ce6cb0ba446f76771d90e09a7b7f1103c66 Mon Sep 17 00:00:00 2001 >From: Bruno Damour <freebsd@ruomad.net> >Date: Mon, 6 Jun 2022 09:59:47 +0200 >Subject: [PATCH] OpenCA's libpki library > >--- > security/libpki/Makefile | 48 ++++++ > security/libpki/distinfo | 3 + > security/libpki/files/patch-configure.ac | 36 ++++ > security/libpki/files/patch-global-vars.in | 10 ++ > security/libpki/files/patch-pki_config.c | 11 ++ > security/libpki/pkg-descr | 5 + > security/libpki/pkg-plist | 189 +++++++++++++++++++++ > 7 files changed, 302 insertions(+) > create mode 100644 security/libpki/Makefile > create mode 100644 security/libpki/distinfo > create mode 100644 security/libpki/files/patch-configure.ac > create mode 100644 security/libpki/files/patch-global-vars.in > create mode 100644 security/libpki/files/patch-pki_config.c > create mode 100644 security/libpki/pkg-descr > create mode 100644 security/libpki/pkg-plist > >diff --git a/security/libpki/Makefile b/security/libpki/Makefile >new file mode 100644 >index 000000000000..4567d65586bc >--- /dev/null >+++ b/security/libpki/Makefile >@@ -0,0 +1,48 @@ >+# Created by Bruno Damour <bruno@ruomad.net> >+# >+ >+PORTNAME= libpki >+DISTVERSION= 0.9.2 >+DISTVERSIONPREFIX= v >+CATEGORIES= security >+DISTNAME= libpki-0.9.2 >+ >+MAINTAINER= bruno@ruomad.net >+COMMENT= OpenCA PKI library (libpki) and tools >+ >+LICENSE= APACHE20 >+LICENSE_FILE= ${WRKSRC}/COPYING >+ >+LIB_DEPENDS= libxml2.so:textproc/libxml2 >+ >+USES= ssl autoreconf libtool >+USE_GITHUB= yes >+GH_ACCOUNT= openca >+#GH_TAGNAME= v0.8.9-198-g14ad48e >+ >+USE_LDCONFIG= yes >+ >+# Provided patches fix : >+# - src/pki.config.c to replace a breaking call to strncpy by strcpy >+# - src/global-vars.in to add localrootdir (new autoconf versions) >+# - configure.ac to (i) fix a typo in AC_COMPILE_IFELSE invocation, >+# (ii) not to append mybits to libdir (lib vs lib64) on *bsd*, and >+# (iii) map target arm64 (reported by FreeBSD) to expected x86_64 : >+# hence the need to autoreconf >+PATCH_STRIP= -p0 >+ >+GNU_CONFIGURE= yes >+CONFIGURE_ARGS= --disable-dependency-tracking \ >+ --disable-ldap --disable-mysql --disable-pg \ >+ --disable-dns --disable-iphone \ >+ --with-xml2-prefix=${LOCALBASE} >+INSTALL_TARGET= install-strip >+ >+# Rename installed configuration files to samples >+post-stage: >+ ${MV} ${WRKDIR}/stage${PREFIX}/etc/pki.conf ${WRKDIR}/stage${PREFIX}/etc/pki.conf.sample; \ >+ for f in $$(find ${STAGEDIR}${PREFIX}/etc/libpki -type f); do \ >+ ${MV} $$f $$f.sample; \ >+ done >+ >+.include <bsd.port.mk> >diff --git a/security/libpki/distinfo b/security/libpki/distinfo >new file mode 100644 >index 000000000000..be3541de54f0 >--- /dev/null >+++ b/security/libpki/distinfo >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1654414123 >+SHA256 (openca-libpki-v0.9.2_GH0.tar.gz) = 4352a77457579a498837e33fbc0092f67a1c5d93eee6eb73bc889ad8b8f747fb >+SIZE (openca-libpki-v0.9.2_GH0.tar.gz) = 1184928 >diff --git a/security/libpki/files/patch-configure.ac b/security/libpki/files/patch-configure.ac >new file mode 100644 >index 000000000000..73e5661232da >--- /dev/null >+++ b/security/libpki/files/patch-configure.ac >@@ -0,0 +1,36 @@ >+--- configure.ac.orig 2022-06-04 12:46:07.578141000 +0200 >++++ configure.ac 2022-06-05 10:08:00.940257000 +0200 >+@@ -267,6 +267,7 @@ >+ ;; >+ *bsd*) myarch=bsd >+ shlext=so >++ mybits_install="" >+ ;; >+ *iphone*) >+ myarch=iphone >+@@ -308,6 +309,9 @@ >+ x86_64-*) >+ arch_target=x86_64 >+ ;; >++ amd64*-*) >++ arch_target=x86_64 >++ ;; >+ sparc*-*) >+ arch_target=Sparc >+ ;; >+@@ -524,13 +528,13 @@ >+ dnl [ pthread_rw=no ] ) >+ >+ dnl AC_TRY_COMPILE( [ >+-AC_COMPILE_IFELSE( AC_LANG_SOURCE([[ >++AC_COMPILE_IFELSE( [AC_LANG_SOURCE([ >+ #include <sys/types.h> >+ #include <pthread.h> >+ pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER; >+ int main() { >+ return (0); >+-} ]]), >++} ])], >+ [ pthread_rw=yes ] , >+ [ pthread_rw=no ] ) >+ >diff --git a/security/libpki/files/patch-global-vars.in b/security/libpki/files/patch-global-vars.in >new file mode 100644 >index 000000000000..3da6cfd4ec75 >--- /dev/null >+++ b/security/libpki/files/patch-global-vars.in >@@ -0,0 +1,10 @@ >+--- src/global-vars.in.orig 2021-01-16 01:14:34.000000000 +0100 >++++ src/global-vars.in 2021-08-25 14:58:51.219021000 +0200 >+@@ -20,6 +20,7 @@ >+ DEST_SBINDIR = $(DESTDIR)@sbindir@ >+ DEST_BINDIR = $(DESTDIR)@bindir@ >+ DEST_LIBDIR = $(DESTDIR)@libdir@ >++DEST_DATADIR = @datarootdir@ >+ DEST_DATADIR = @datadir@ >+ DEST_INFODIR = @infodir@ >+ DEST_MANDIR = @mandir@ >diff --git a/security/libpki/files/patch-pki_config.c b/security/libpki/files/patch-pki_config.c >new file mode 100644 >index 000000000000..26c465266ff0 >--- /dev/null >+++ b/security/libpki/files/patch-pki_config.c >@@ -0,0 +1,11 @@ >+--- src/pki_config.c.orig 2021-01-16 00:14:34 UTC >++++ src/pki_config.c >+@@ -83,7 +83,7 @@ static char * _xml_search_namespace_add ( char *search >+ PKI_Free( my_arg ); >+ >+ ret = PKI_Malloc ( strlen( my_search ) + 1); >+- strncpy( ret, my_search, strlen(my_search) ); >++ strcpy( ret, my_search ); >+ >+ PKI_Free ( my_search ); >+ return( ret ); >diff --git a/security/libpki/pkg-descr b/security/libpki/pkg-descr >new file mode 100644 >index 000000000000..340bf48e1d42 >--- /dev/null >+++ b/security/libpki/pkg-descr >@@ -0,0 +1,5 @@ >+OpenCA LibPKI provides an easy-to-use PKI library for PKI enabled application development. >+The library provides the developer with all the needed functionalities to manage certificates, >+from generation to validation. >+ >+WWW: https://www.openca.org/projects/libpki >diff --git a/security/libpki/pkg-plist b/security/libpki/pkg-plist >new file mode 100644 >index 000000000000..ba649f1dcf02 >--- /dev/null >+++ b/security/libpki/pkg-plist >@@ -0,0 +1,189 @@ >+bin/libpki-config >+bin/pki-cert >+bin/pki-crl >+bin/pki-derenc >+bin/pki-query >+bin/pki-request >+bin/pki-siginfo >+bin/pki-tool >+bin/pki-xpair >+bin/url-tool >+etc/libpki/hsm.d/eracom-sdk.xml.sample >+etc/libpki/hsm.d/etoken-engine.xml.sample >+etc/libpki/hsm.d/etoken-pkcs11.xml.sample >+etc/libpki/hsm.d/etoken.xml.sample >+etc/libpki/hsm.d/opencryptoki.xml.sample >+etc/libpki/hsm.d/tpm.xml.sample >+etc/libpki/objectIdentifiers.xml.sample >+etc/libpki/profile.d/crl.xml.sample >+etc/libpki/profile.d/server.xml.sample >+etc/libpki/profile.d/test.xml.sample >+etc/libpki/profile.d/user.xml.sample >+etc/libpki/store.d/empty.xml.sample >+etc/libpki/token.d/default.xml.sample >+etc/libpki/token.d/eracom.xml.sample >+etc/libpki/token.d/etoken-engine.xml.sample >+etc/libpki/token.d/etoken.xml.sample >+etc/libpki/token.d/opencryptoki.xml.sample >+etc/libpki/token.d/software.xml.sample >+etc/libpki/token.d/test.xml.sample >+etc/libpki/token.d/tpm.xml.sample >+etc/pki.conf.sample >+@comment include/internal/ossl_1_0_x/cms_lcl.h >+@comment include/internal/ossl_1_1_0/cms_lcl.h >+@comment include/internal/ossl_1_1_0/ocsp_lcl.h >+@comment include/internal/ossl_1_1_0/x509_int.h >+@comment include/internal/ossl_1_1_0/x509_lcl.h >+@comment include/internal/ossl_1_1_1/cms_lcl.h >+@comment include/internal/ossl_1_1_1/ocsp_lcl.h >+@comment include/internal/ossl_1_1_1/refcount.h >+@comment include/internal/ossl_1_1_1/x509_int.h >+@comment include/internal/ossl_1_1_1/x509_lcl.h >+include/libpki/banners.h >+include/libpki/cmc.h >+include/libpki/cmc/cmc_cert_req.h >+include/libpki/compat.h >+include/libpki/config.h >+include/libpki/crypto.h >+include/libpki/datatypes.h >+include/libpki/drivers/engine/data_st.h >+include/libpki/drivers/engine/engine_hsm.h >+include/libpki/drivers/engine/engine_hsm_obj.h >+include/libpki/drivers/engine/engine_hsm_pkey.h >+include/libpki/drivers/engine/engine_st.h >+include/libpki/drivers/hsm_keypair.h >+include/libpki/drivers/hsm_main.h >+include/libpki/drivers/hsm_slot.h >+include/libpki/drivers/kmf/data_st.h >+include/libpki/drivers/kmf/kmf_hsm.h >+include/libpki/drivers/kmf/kmf_hsm_engine.h >+include/libpki/drivers/kmf/kmf_hsm_pkey.h >+include/libpki/drivers/kmf/kmf_hsm_sign.h >+include/libpki/drivers/kmf/pki_kmflib.h >+include/libpki/drivers/openssl/data_st.h >+include/libpki/drivers/openssl/openssl_hsm.h >+include/libpki/drivers/openssl/openssl_hsm_cb.h >+include/libpki/drivers/openssl/openssl_hsm_obj.h >+include/libpki/drivers/openssl/openssl_hsm_pkey.h >+include/libpki/drivers/pkcs11/pkcs11_hsm.h >+include/libpki/drivers/pkcs11/pkcs11_hsm_obj.h >+include/libpki/drivers/pkcs11/pkcs11_hsm_pkey.h >+include/libpki/drivers/pkcs11/pkcs11_utils.h >+include/libpki/drivers/pkcs11/rsa/cryptoki.h >+include/libpki/drivers/pkcs11/rsa/pkcs11.h >+include/libpki/drivers/pkcs11/rsa/pkcs11_func.h >+include/libpki/drivers/pkcs11/rsa/pkcs11f.h >+include/libpki/drivers/pkcs11/rsa/pkcs11t.h >+include/libpki/errors-new.h >+include/libpki/errors.h >+include/libpki/est/est.h >+include/libpki/est/pki_x509_est_asn1.h >+include/libpki/est/pki_x509_est_attrs.h >+include/libpki/est/pki_x509_est_data.h >+include/libpki/est/pki_x509_est_msg.h >+include/libpki/extensions.h >+include/libpki/hsm_st.h >+include/libpki/io/pki_keypair_io.h >+include/libpki/io/pki_msg_req_io.h >+include/libpki/io/pki_msg_resp_io.h >+include/libpki/io/pki_ocsp_req_io.h >+include/libpki/io/pki_ocsp_resp_io.h >+include/libpki/io/pki_x509_cert_io.h >+include/libpki/io/pki_x509_cms_io.h >+include/libpki/io/pki_x509_crl_io.h >+include/libpki/io/pki_x509_io.h >+include/libpki/io/pki_x509_p12_io.h >+include/libpki/io/pki_x509_pkcs7_io.h >+include/libpki/io/pki_x509_req_io.h >+include/libpki/io/pki_x509_xpair_io.h >+include/libpki/libpkiv.h >+include/libpki/net/dns.h >+include/libpki/net/http_s.h >+include/libpki/net/ldap.h >+include/libpki/net/pkcs11.h >+include/libpki/net/pki_mysql.h >+include/libpki/net/pki_pg.h >+include/libpki/net/pki_socket.h >+include/libpki/net/sock.h >+include/libpki/net/ssl.h >+include/libpki/net/url.h >+include/libpki/openssl/data_st.h >+include/libpki/openssl/pthread_init.h >+include/libpki/os.h >+include/libpki/pki.h >+include/libpki/pki_algor.h >+include/libpki/pki_conf.h >+include/libpki/pki_config.h >+include/libpki/pki_cred.h >+include/libpki/pki_digest.h >+include/libpki/pki_err.h >+include/libpki/pki_hmac.h >+include/libpki/pki_id.h >+include/libpki/pki_id_info.h >+include/libpki/pki_init.h >+include/libpki/pki_integer.h >+include/libpki/pki_io.h >+include/libpki/pki_keypair.h >+include/libpki/pki_keyparams.h >+include/libpki/pki_log.h >+include/libpki/pki_mem.h >+include/libpki/pki_msg.h >+include/libpki/pki_msg_req.h >+include/libpki/pki_msg_resp.h >+include/libpki/pki_ocsp_req.h >+include/libpki/pki_ocsp_resp.h >+include/libpki/pki_oid.h >+include/libpki/pki_string.h >+include/libpki/pki_threads.h >+include/libpki/pki_threads_vars.h >+include/libpki/pki_time.h >+include/libpki/pki_x509.h >+include/libpki/pki_x509_attribute.h >+include/libpki/pki_x509_cert.h >+include/libpki/pki_x509_cert_mem.h >+include/libpki/pki_x509_cms.h >+include/libpki/pki_x509_crl.h >+include/libpki/pki_x509_data_st.h >+include/libpki/pki_x509_extension.h >+include/libpki/pki_x509_mem.h >+include/libpki/pki_x509_mime.h >+include/libpki/pki_x509_name.h >+include/libpki/pki_x509_p12.h >+include/libpki/pki_x509_pkcs7.h >+include/libpki/pki_x509_profile.h >+include/libpki/pki_x509_req.h >+include/libpki/pki_x509_signature.h >+include/libpki/pki_x509_xpair.h >+include/libpki/pki_x509_xpair_asn1.h >+include/libpki/profile.h >+include/libpki/prqp/http_client.h >+include/libpki/prqp/prqp.h >+include/libpki/prqp/prqp_asn1.h >+include/libpki/prqp/prqp_bio.h >+include/libpki/prqp/prqp_lib.h >+include/libpki/prqp/prqp_req_io.h >+include/libpki/prqp/prqp_resp_io.h >+include/libpki/prqp/prqp_srv.h >+include/libpki/prqp/prqp_stack.h >+include/libpki/scep/pki_x509_scep_asn1.h >+include/libpki/scep/pki_x509_scep_attrs.h >+include/libpki/scep/pki_x509_scep_data.h >+include/libpki/scep/pki_x509_scep_msg.h >+include/libpki/scep/scep.h >+include/libpki/stack.h >+include/libpki/support.h >+include/libpki/token.h >+include/libpki/token_data.h >+include/libpki/token_id.h >+include/libpki/token_st.h >+lib/libpki.a >+lib/libpki.so >+lib/libpki.so.92 >+lib/libpki.so.92.92.4 >+@comment libdata/ldconfig/libpki >+@comment share/libpki/README.data_structures >+@comment share/libpki/README.functions >+@comment share/libpki/doxygen-man.conf >+@comment share/libpki/doxygen-pdf.conf >+@comment share/libpki/doxygen.conf >+@comment share/libpki/pkginfo >-- >2.36.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 264474
:
234463
|
234482
|
234505
|
234686
|
234689
|
234690
|
234910
|
235225