2

I have two certificates installed:

kirrun@kirNote ~ [1197]% certutil -d sql:/home/kirrun/.pki/nssdb -L

Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI

CAcert WoT User's CA Cert Signing Authority ID               u,u,u
CAcert WoT User's CA Cert Signing Authority ID               u,u,u

As you can see both certificates have the same nickname, but they obviously have different serial numbers. So, I want to remove one of them. It seems to me that certutil can only remove certificates by nickname.

The question is: how do I remove exactly one of those two certificates (and not a random one but the one I want to remove)?

2 Answers 2

0

Easiest way? Remove both and reinstall the one you want?

https://developer.mozilla.org/en-US/docs/NSS_reference/NSS_tools_:_certutil

3
  • A bit more detail might make this a better answer
    – Dave M
    Commented Feb 11, 2014 at 20:38
  • What if I don't have them elsewhere? And I can't export just one of them using pk12util because… well… same issue =).
    – kirelagin
    Commented Feb 14, 2014 at 9:03
  • Duplicate the DB. Export one from the DB, delete one from the DB [these will most likely be the same one], export one from the DB, delete one from the DB. Compare the two and add back the one you want. For further help please answer two questions: 1) Where did you get them from in the first place? 2) Why do you think you need to delete one of them? - ram
    – Ram
    Commented Feb 14, 2014 at 18:49
0

So, I finally managed to do this using Chromium's GUI (it's in Settings > Show advanced settings > HTTPS/SSL > Manage certificates).

This works if using a GUI is an option for you and if the database in question is sql:~/.pki/nssdb. If it's elsewhere you'll probably have to move directories around. If it's not sql, then using Firefox's GUI might be an option, but note that it stores its cert db in ~/.mozilla/firefox/<profile> (moving files around again) and, unfortunatelly, it's not working for me: when I click “delete” the record disappears from the list but, actually, nothing changes in the db.

I'm still looking for a distro-agnostic way to do this from the console.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .