Enabling Smart Card in Firefox on Windows


This article covers configuring Firefox on Windows for use with the YubiKey's PIV smart card application. This article assumes Firefox is already installed.

 

First, download and install the Yubico PIV Tool from this page. Make sure to choose an installer based on whether you have 32 or 64-bit Firefox installed; this will not always match your OS.

 

After installing, the Yubico PIV Tool\bin directory needs to be added to the system path in order for other applications to be able to load the PKCS #11 module it contains (YKCS11). This is because libykcs11.dll is dynamically linked to libykpiv.dll and libcrypto-1_1.dll, and both of them need to be accessible for YKCS11 to be useful.

 

On Windows 10, setting the system path is done by following these steps:

 

  1. Open the Control Panel and select System and SecuritySystemAdvanced System Settings.
  2. Click Environment Variables…
  3. Under System variables, select Path and click Edit…
  4. Click New and add the absolute path to the Yubico PIV Tool\bin directory. The default locations are:
    • for x64 - C:\Program Files\Yubico\Yubico PIV Tool\bin
    • for x86 - C:\Program Files (x86)\Yubico\Yubico PIV Tool\bin
  5. Click OK to confirm your changes in all windows, then reboot your system so the changes will take effect.

Once the system path variable has been updated and your computer rebooted, follow the instructions below to configure Firefox to load ykcs11.

 

  1. With the Firefox window active, press AltT, then O, one at a time. Alternatively, from the Firefox taskbar, click the three bar menu button, and then click Options.
  2. Click the Privacy & Security menu from the left-hand navigation.
  3. Scroll down until you see the Certificates heading, then click Security Devices.
  4. At the Device Manager window, click the Load button and enter this module name: Yubico YKCS11 Module.
  5. Click Browse..., browse to the Yubico PIV Tool\bin directory, and double-click the file libykcs11.dll. The default locations are:
    • for x64 - C:\Program Files\Yubico\Yubico PIV Tool\bin
    • for x86 - C:\Program Files (x86)\Yubico\Yubico PIV Tool\bin
  6. Click OK in the load popup and Device Manager window to confirm your changes.
  7. Close and reopen Firefox, insert your YubiKey and reopen Security Devices to ensure the YubiKey is loaded.