mkcert icon indicating copy to clipboard operation
mkcert copied to clipboard

certutil: could not authenticate to token NSS Certificate DB.: SEC_ERROR_IO: An I/O error occurred during security authorization.

Open devsumanmdn opened this issue 6 years ago • 5 comments

I tried looking an old issue #12, but it doesn't seem to help

Commands I have executed: sudo chmod u+x ./mkcert, and tried this also later sudo chmod 0777 ./mkcert, then sudo ./mkcert -install I have libnss3-tools version 2:3.28.4-0ubuntu0.16.04.5 installed which seems the latest for Ubuntu 16.04 LTS

Using the local CA at "/home/user/.local/share/mkcert" ✨
ERROR: failed to execute "certutil -A": exit status 255

certutil: could not authenticate to token NSS Certificate DB.: SEC_ERROR_IO: An I/O error occurred during security authorization.

devsumanmdn avatar Mar 15 '19 07:03 devsumanmdn

From https://www.redhat.com/archives/pki-users/2009-April/msg00037.html

Side note: the i/o error happens because of the missing NSS db files, either wrong alias directory with -d, or need a certutil -N -d to create them.

Have you started Firefox and/or Chrome and loaded a webpage? I needed to do that on a fresh linux machine with certutil before.

adamdecaf avatar Mar 17 '19 16:03 adamdecaf

Have you started Firefox and/or Chrome and loaded a web page? I needed to do that on a fresh linux machine with certutil before.

Ya Chrome and Firefox both are loading web pages without an issue, and the Ubuntu installation is old also. And as long as I have gathered certutil -A automatically creates a database if needed, still not sure about the source of this error.

devsumanmdn avatar Mar 18 '19 04:03 devsumanmdn

Still searching for a solution...

Alek5andr avatar Jun 30 '20 09:06 Alek5andr

Fixed by creating a new NSS database: certutil -N -d <nss_db location>

fiialo avatar Nov 05 '21 20:11 fiialo