Puumerkki is a library used for signing PDF documents. It can read and modify pdfs to prepare them for signing, calculate the hash for signing, create the signature container and embed it to the pdf. Signing is done by an external service, usually with an ID card from DVV together with a card reader and its software.
See dev-src/clj/puumerkki/main.clj
for example usages
Energiatodistuspalvelu uses this library. Check out the code from energiatodistus-pdf namespace
In order to execute tests in JVM, install Leigingen and run:
lein test
JS-tests are run with Shadow-cljs. Install npm, run npm install
and execute tests:
npm test
There is a test server, that can be used as an example when developing signature solutions.
The server can be used to sign certificates together with the card reader software.
./download-dvv-trusted-certificates.sh
lein with-profile dev run -t citizen-certificate-roots.pem
docker run -p 443:443 caddy caddy reverse-proxy --from localhost:443 --to http://host.docker.internal:3000
docker run -p 443:443 caddy caddy reverse-proxy --from localhost:443 --to http://localhost:3000
Snapshots are published to Clojars automatically by GitHub Actions when a commit is pushed to master.
Releases are published to Clojars manually by developers.
CLOJARS_USERNAME
and CLOJARS_TOKEN
environment variables.There are three release tasks to choose from: release-current
, release-minor
, and release-major
.
The first one promotes the current snapshot to a release, and the other two increment the version number accordingly before doing the same.
After the release, a new snapshot version with patch number incremented is set.
NOTE: Why not use the default Leiningen release task or set desired :release-tasks in project.clj?
Version should be incremented after releasing, so that new snapshots have a new version. However, it's not known at the time of releasing whether the next release requires incrementing minor or major version. The current assumption is that most of the time patch release is enough. Therefore, patch version is incremented after releasing, and minor/major version is incremented only when needed when creating a new release. With the default tasks this wouldn't be possible, as every other patch would be skipped if version was incremented every time before release.
To release a new version, follow these steps:
git switch -c release
CHANGELOG.md
. Commit your changes.lein release-current
, lein release-minor
, or lein release-major
git push --follow-tags --set-upstream origin release
Can you improve this documentation? These fine people already did:
Antti Möttönen, Juho Leinonen & Antti RämöEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close