BorisWilhelms / create-dotnet-devcert

A simple script that creates and trusts a self-signed development certificate for dotnet on Linux distributions.
https://blog.wille-zone.de/post/aspnetcore-devcert-for-ubuntu
MIT License
329 stars 71 forks source link

certutil: could not find certificate named "dotnet-devcert": SEC_ERROR_INVALID_ARGS: security library: invalid arguments. #15

Open JwanKhalaf opened 9 months ago

JwanKhalaf commented 9 months ago

Hello

I'm not sure if some instructions are missing in the README, but when I run the script, I get:

~/code/create-dotnet-devcert/scripts main ❯ ./arch-create-dotnet-devcert.sh    
....+...+...+....+......+........+.........+...+....+++++++++++++++++++++++++++++++++++++++*.+..............+.+..+....+......+..+......+.........+......+.......+...+.....+....+........+...............+...+..........+..+.........+....+......+...+++++++++++++++++++++++++++++++++++++++*..+.....+......+...+......+....+..+......+...+......+....+.........+..+......+....+.....+...+...+...+.......+..+......+.+.....+..................+......+.........+...+.......+......+.....+.........+................+.........+...+..+.......+.....+...+............+..........+...............+......+.....+...+......+...+...+.......+...........+.........+.+.....+.+...+...........+.......+.....+.......+............+..............+......+.+..+.+..+.........+...+.......+...............+...+..+.+........+............+...+.+........+..........+..+......+...+....+..+.+.....+............+.+.........+...+..+......+....+...+...............+.....+....+.....+.+..+......+.+.........+...........+.+..+.+.........+.....+...+....+......+...+......+...+..+...+.+....................+......+.+.....+...+.......+........+....+............+.....+......+..........+...+..+...+.+........+.+.....+......+....+.....+.+...+.....+...+....+..............................+...+................................+.+..+.+...............+..+...+............+.......+..+.........+....+........+.......+..+....+.........+..................+..+.+.....+.......+..+.++++++
.......+..+.+.....+.........+...+.........+.+........+++++++++++++++++++++++++++++++++++++++*.....+++++++++++++++++++++++++++++++++++++++*.......+....+....................+.......+...............+......+...+...........+.........+.......+...+.....+.+......+..............+.........+....+......+..+......................+...+...+...........+...+......+.........+.+..+....+......+.....+....+.........+..+.........+....+.........+........+...+...............+....+...+..+............+.+........+.+......+..+...+....+......+..............+...+...+.......+.......................+.......+.....+.+.................+....+...+..+.............+..................+...+..............+...+...+.......+..+.+...........+...+...............+.+..+....+...........+.........+.+.....+..........+..++++++
-----
Configuring nssdb for /home/j/.pki/nssdb
certutil: could not find certificate named "dotnet-devcert": SEC_ERROR_INVALID_ARGS: security library: invalid arguments.
HTTPS development certificates successfully removed from the machine.
The certificate was successfully imported.

At the bottom it says the cert was successfully imported, but two lines before that, it says there was a certutil error.

Is this normal? Should I just ignore that error?

image

BoyanYK commented 6 months ago

I encountered the same issue but rerunning the command with sudo fixed it.