From 37ed5325a66de2dd2dd4fbb3a18477d080048ad3 Mon Sep 17 00:00:00 2001 From: Christian Tosta Date: Mon, 19 May 2025 21:48:26 -0300 Subject: [PATCH] Added documentation --- CMakeLists.txt | 34 ++++++++++++++++++++++++++++++++++ README.md | 16 ++++++++++++++++ packaging/pkg.spec.in | 5 ++++- sources | 3 +++ 4 files changed, 57 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 938f3c4..99cd253 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,9 +32,15 @@ include(CPackLists.txt) add_custom_target(clear-certs COMMAND rm -rf certs/ + docs/ pki/ ) +add_custom_target(clear-docs + COMMAND rm -rf + docs/ +) + add_custom_target(certs COMMAND xargs -n1 curl @@ -44,10 +50,19 @@ add_custom_target(certs && cd certs && (sha512sum -c --quiet ${HASH_FILE} || exit -1) && unzip ACcompactado.zip + && rm -f ACcompactado.zip ${HASH_FILE} DEPENDS clear-certs ) +add_custom_target(docs ALL + COMMAND mkdir docs + && mv certs/*.pdf docs/ + DEPENDS + clear-docs + certs +) + add_custom_target(isrg-root-x2.crt COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/crt2bundle.sh pki/ca-trust-source/anchors/isrg-root-x2.crt @@ -82,6 +97,13 @@ add_custom_target(anchors ALL icp-brasil-ca-bundle.crt ) +# Checks for OpeSSL utility +find_program(OPENSSL + NAMES openssl openssl3 + REQUIRED +) +message("-- Check for OpenSSL utility: ${OPENSSL}") + # Checks which tool is used to update certificate keyring find_program(UPDATE_CACERTS_TOOL NAMES @@ -110,4 +132,16 @@ install( ${CMAKE_INSTALL_PREFIX}/${CACERT_INSTALL_DIR} ) +set(DOCS_INSTALL_DIR "share/doc/${PROJECT}") +install( + FILES + ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE + ${CMAKE_CURRENT_SOURCE_DIR}/README.md + ${CMAKE_CURRENT_BINARY_DIR}/docs/cpsrootca.pdf + ${CMAKE_CURRENT_BINARY_DIR}/docs/DPCacraiz.pdf + ${CMAKE_CURRENT_BINARY_DIR}/docs/PSacraiz.pdf + DESTINATION + ${CMAKE_INSTALL_PREFIX}/${DOCS_INSTALL_DIR} +) + # vim: ts=2:sw=2:sts=2:et diff --git a/README.md b/README.md index ff4666d..1c2ad6d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # ca-certificates-brazil +--- The Brazilian Public Key Infrastructure: ICP-Brasil ## Description @@ -10,3 +11,18 @@ It is observed that the model adopted by Brazil was single-root certification, and the ITI, in addition to playing the role of Root Certifying Authority - Root AC, also has the role of accrediting and discrediting the other participants in the chain, supervise and audit the processes. + +## Documentation + +* [ICP-Brasil Root Certification Authority Certification Practices Statement (in Portuguese)]( + https://acraiz.icpbrasil.gov.br/DPCacraiz.pdf + ) +* [Certification Practice Statement Root Certification Authority of Brazil]( + https://acraiz.icpbrasil.gov.br/cpsrootca.pdf + ) +* [Política de Segurança da AC-Raiz]( + https://acraiz.icpbrasil.gov.br/PSacraiz.pdf + ) + +These files may also have been distributed within the installation package provided +by your distribution. diff --git a/packaging/pkg.spec.in b/packaging/pkg.spec.in index a7840e0..f41cc68 100644 --- a/packaging/pkg.spec.in +++ b/packaging/pkg.spec.in @@ -42,7 +42,10 @@ chain, supervise and audit the processes. %{cmake_install} -%files +%files +%doc %{_datadir}/doc/*.pdf +%doc %{_datadir}/doc/README.md +%license %{_datadir}/doc/LICENSE %{_datadir}/pki/ca-trust-source/anchors/isrg-root-x2.crt %{_datadir}/pki/ca-trust-source/anchors/lets-encrypt-ca-bundle.crt %{_datadir}/pki/ca-trust-source/anchors/icp-brasil-ca-bundle.crt diff --git a/sources b/sources index 5432524..d90a1aa 100644 --- a/sources +++ b/sources @@ -5,3 +5,6 @@ https://letsencrypt.org/certs/lets-encrypt-e1.pem https://letsencrypt.org/certs/lets-encrypt-e2.pem https://letsencrypt.org/certs/lets-encrypt-r3.pem https://letsencrypt.org/certs/lets-encrypt-r4.pem +https://acraiz.icpbrasil.gov.br/DPCacraiz.pdf +https://acraiz.icpbrasil.gov.br/cpsrootca.pdf +https://acraiz.icpbrasil.gov.br/PSacraiz.pdf