A guide for using the qualified electronic certificate on a Serbian ID card (lična karta) on macOS — including signing documents for APR and authenticating on government portals like eUprava and ePorezi.
⚠️ MUP does not officially support macOS. This guide uses open-source tools created by Nikola Ubavić as a replacement for the Windows-only TrustEdgeID middleware.
Tested on: Apple Silicon (M3) + macOS Sequoia 15.x, April 2026.
| Item | Description |
|---|---|
| Serbian ID card (lična karta) | With a qualified electronic certificate written to the chip |
| Smart card reader | USB reader (e.g. Gemalto/Thales) |
| macOS | Apple Silicon (M1/M2/M3/M4) or Intel |
Your Mac needs a PKCS#11 library to communicate with the smart card chip. On Windows, MUP provides TrustEdgeID for this. On macOS, we use the open-source srb-id-pkcs11.
- Go to github.com/ubavic/srb-id-pkcs11/releases
- Download the
.dylibfile for your architecture:- Apple Silicon (M1/M2/M3/M4):
libsrb-id-pkcs11.arm.x.x.x.dylib - Intel Mac:
libsrb-id-pkcs11.x64.x.x.x.dylib
- Apple Silicon (M1/M2/M3/M4):
- Save it to a permanent location on your Mac. You'll need to reference this path later.
If macOS blocks the
.dylibfrom running, go to System Settings → Privacy & Security and click Allow Anyway. Alternatively, you can build the project locally with Zig — see the project README for instructions.
Baš Čelik is a tool for reading data from Serbian ID cards (name, address, photo, etc.). It's not required for signing, but useful for confirming your reader and card work on macOS.
- Go to github.com/ubavic/bas-celik/releases
- Download the macOS version
- Install and run it
- Insert your ID card — it should display your personal data
If Baš Čelik reads the card successfully, your hardware setup is working.
Firefox is required for authenticating on Serbian government portals (eUprava, ePorezi, etc.). It needs to be configured to use the PKCS#11 library.
- Open Firefox
- Go to Settings → Privacy & Security
- Scroll to Security Devices (at the bottom)
- Click Load
- For Module Name, enter:
Serbian ID PKCS11 - For Module filename, enter the full path to your
.dylibfile - Click OK
- Restart Firefox
You can now use your ID card for authentication on:
If you want to sign PDFs directly in Adobe Acrobat Reader without using APR's NexU-APR application. Adobe Acrobat Reader is free: get.adobe.com/reader.
This is required — without it, the "Attach Module" button will be grayed out.
- Open Adobe Acrobat and go to Preferences (
Cmd + ,) - Select Security (Enhanced) on the left sidebar
- Uncheck Enable Protected Mode at startup. If the Attach Module button is still grayed out later, also uncheck Enable Enhanced Security.
- Click OK, then quit Acrobat completely (
Cmd + Q) and reopen it
- Open Preferences (
Cmd + ,) - Select Signatures on the left
- Under Identities & Trusted Certificates, click More...
- In the new window, select PKCS#11 Modules and Tokens on the left
- Click Attach Module at the top
- When the file browser opens, press
Cmd + Shift + G - Paste the full path to your
.dylibfile and press Return - Click Open
- Go to Preferences (
Cmd + ,) → Signatures - Under Creation & Appearance, click More...
- Set Default Signing Format to CAdES-Equivalent
- Check Include signature's revocation status (this embeds OCSP/CRL data — requires internet during signing)
- Click OK
- Go to Preferences (
Cmd + ,) → Signatures - Under Verification, click More...
- Check Verify signatures when the document is opened
- Check Require certificate revocation checking to succeed whenever possible during signature verification
- Under Windows Integration (at the bottom), check both:
- Validating Signatures
- Validating Certified Documents
- Click OK
macOS doesn't trust Serbian government certificates by default.
- Download the MUP root CA certificates from the MUP CA website
- Double-click each
.crtfile - When prompted, set the Keychain dropdown to System and click Add
- Open Keychain Access (
Cmd + Space, search for it) - Select System on the left sidebar
- Find the MUP certificates you just added
- Double-click each certificate to open its settings
- Expand the Trust section (click the triangle)
- Change the top dropdown to Always Trust
- Close the window and enter your Mac password to confirm
Repeat for both the Root CA and any Intermediate CA certificates.
- Insert your ID card into the reader
- Open the PDF you want to sign in Adobe Acrobat
- Go to the PKCS#11 Modules and Tokens menu (Preferences → Signatures → Identities & Trusted Certificates → More...)
- Expand your loaded module to reveal your smart card token
- Select your token and click Login — enter your 4-digit PIN
- Close Preferences, then go to More Tools → Certificates
- Click Digitally Sign in the toolbar
- Draw a rectangle on the PDF where you want the signature to appear
- In the Sign with a Digital ID dialog, select the certificate marked for Digital Signature - Non Repudiation (not the authentication certificate)
- Check Lock document after signing
- Click Sign, choose where to save the signed PDF, and enter your PIN again when prompted
Important: Your ID card may contain two certificates — one for authentication and one for signing. Always select the one designated for digital signing (Non Repudiation).
NexU-APR is APR's own signing application, used when submitting documents through APR's e-applications. It requires Java 8 with JavaFX.
Standard OpenJDK 8 builds (Temurin, regular Zulu) do not include JavaFX and will not work — NexU-APR will crash on launch with NoClassDefFoundError: javafx/application/Application. You need the JDK FX variant specifically.
- Go to azul.com/downloads
- Filter by: Java 8 → macOS → ARM 64-bit (or x64 for Intel) → JDK FX
- Download the .dmg file and install it
Verify the installation:
/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/java -versionVerify JavaFX is included:
ls /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/jfxrt.jarIf the file exists, Java is ready.
NexU-APR needs to find Java 8. If you have other Java versions installed, you have two options:
Option A — Set Java 8 as the system default:
Add to your shell config (e.g. ~/.zshrc):
export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home
export PATH="$JAVA_HOME/bin:$PATH"Run source ~/.zshrc to apply. This changes java globally — other Java versions you have installed will no longer be the default.
Option B — Launch NexU with Java 8 without changing the system default:
Add an alias to your shell config (e.g. ~/.zshrc):
alias nexu='JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home /Applications/NexuAPR.app/Contents/MacOS/NexuAPR &'Run source ~/.zshrc to apply. Then launch NexU from the terminal by typing nexu. Your default Java remains unchanged.
- Download: http://dl.apr.gov.rs/NexUAPR.dmg
- Open the DMG and drag NexUAPR to Applications
- First launch: Finder → Applications → Control-click on NexuAPR → Open (to bypass Gatekeeper)
- A proxy settings dialog will appear — leave all fields empty and click U Redu
- The NexU icon will appear in the menu bar (top right)
- Open your browser and go to:
https://localhost:9889/favicon.ico - If you get a security warning:
- Firefox: click Advanced → Accept the Risk and Continue
- Chrome/Edge: click Advanced → Proceed to localhost
- You should see the NexU-APR icon — this confirms the application is running
- Insert your ID card into the reader
- Make sure NexU-APR is running
- Open: https://aplikacije3.apr.gov.rs/ElektronskoPotpisivanje
- Click Pokreni potpisivanje
- Select the PDF file you want to sign
- On the Metod pristupa tokenu screen:
- Select MUP from the certification authority list
- Select Direktan pristup smart kartici (PKCS #11)
- Click Detaljna Podešavanja
- Click Izmeni
- Click Odaberi and browse to your
.dylibfile - Click Prihvati
- Click Nastavi
- Enter your PIN
- Select the qualified certificate (marked with a green icon) and click Nastavi
- Optionally check "Dodaj sliku potpisa u dokument" to add a visible signature
- Click Nastavi and save the signed PDF
NexU-APR remembers the
.dylibpath, so you only need to configure it once.
Most likely using the wrong Java version or a Java 8 build without JavaFX. Launch from the terminal to see the error:
JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home /Applications/NexuAPR.app/Contents/MacOS/NexuAPRIf you see NoClassDefFoundError: javafx/application/Application, you need the JDK FX variant from Azul, not a regular JDK 8.
- Verify the reader is plugged in and the card is inserted
- Test with Baš Čelik first — if it reads the card, the hardware works
- Try a different USB port
- Check that the
.dylibpath in NexU/Adobe/Firefox is correct
- Verify the PKCS#11 module is loaded: Settings → Privacy & Security → Security Devices
- Restart Firefox after adding the module
- Your card has two certificates — authentication and signing. Government portals use the authentication certificate.
Go to System Settings → Privacy & Security and click Allow Anyway. Alternatively, build the project locally with Zig (see the srb-id-pkcs11 README).
- Make sure you installed and trusted the MUP Root CA certificates in Keychain Access (Step 4.5)
- Verify your system clock, date, and timezone are correct (CET/CEST)
- Ensure Include signature's revocation status is checked in Acrobat's signing preferences
- Internet access is required during signing for OCSP/CRL checks
Harmless. NexU-APR doesn't recognize the Apple Silicon architecture label but runs correctly.
| Resource | URL |
|---|---|
| srb-id-pkcs11 (PKCS#11 middleware) | github.com/ubavic/srb-id-pkcs11 |
| Baš Čelik (ID card reader) | github.com/ubavic/bas-celik |
| Ubavić blog — e-documents | ubavic.rs/e-documents |
| NexU-APR download | dl.apr.gov.rs |
| APR electronic signing page | aplikacije3.apr.gov.rs/ElektronskoPotpisivanje |
| Azul Zulu FX download | azul.com/downloads |
| Adobe Acrobat Reader | get.adobe.com/reader |
| MUP CA certificates | ca.mup.gov.rs |
| APR tech support | sd@apr.gov.rs / 011-418-2000 |
This guide would not be possible without Nikola Ubavić's open-source work on srb-id-pkcs11 and Baš Čelik.
Last updated: April 2026