Bug 29402

Summary: Firefox don't remember self signed certificate exception.
Product: Mageia Reporter: Marc Mascré <marc>
Component: RPM PackagesAssignee: All Packagers <pkg-bugs>
Status: UNCONFIRMED --- QA Contact:
Severity: normal    
Priority: Normal CC: davidwhodgins, lewyssmith, mageia
Version: 8   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: firefox-78.13.0-1.mga8.src.rpm CVE:
Status comment:

Description Marc Mascré 2021-08-24 15:50:04 CEST
I use for my own a self signed certificate.
Each time I go to my https page I get a security warning.

I try to add an exception in preferences of firefox and I ask to keep it permanently.

But if I try to restart firefox, all exception are lost and firefox give me a security warning again.

I just tryed to update firefox to 91.0.1 esr from testing but the problem is still present
Comment 1 Lewis Smith 2021-08-24 20:48:00 CEST
You did not say which version of firefox gave you the problem; I have inserted the latest issued one 'firefox-78.13', which may not be your case.

Please say whether this problem has appeared after a recent update (from what to what); whether it did not happen with earlier versions; or whether you have had it always with Mageia 8. That sort of thing: is it a problem long present, or one that has just appeared?

Source RPM: (none) => firefox-78.13.0-1.mga8.src.rpm
CC: (none) => lewyssmith

Comment 2 Marc Mascré 2021-08-25 12:19:44 CEST
sorry for the lack of precision.
This problem appears during mageia 7 with the first version of firefox 78 if I can remember well. And I had this problem from the beginning of mageia 8.

I read somewhere that the problem was due to firefox 78 esr. 
So I decided to wait for the next version. But when I saw that the 91 esr still have problem, I decide to ask some help.
Comment 3 Lewis Smith 2021-08-26 21:26:44 CEST
Thank you for the clarification.

Assigning initially to DavidW: you are probably the best person to comment on the problem, which looks an upstream thing that we cannot do anything about.

Assignee: bugsquad => luigiwalser

Comment 4 David Walser 2021-08-26 22:21:06 CEST
Yes, Marc will need to report this upstream.

A workaround would be to run your own CA.

Assignee: luigiwalser => pkg-bugs

Comment 5 Martin Whitaker 2021-08-26 23:35:17 CEST
I do this, and it is working for me, using firefox-78.13.0-1.mga8.

When I first access the https server running on my local network, Firefox displays the security warning. Clicking on "Advanced" and then "Accept the risks and continue" causes my self-signed certificate to be automatically and permanently added as both an Authority and a Server in the Firefox Certificate Manager - I don't need to add them manually.

Maybe it is something different about the way you generate your self-signed certificate. I use the following script. Change FQDN to the fully qualified domain name of your server - all the other answers can be anything you like.

#!/bin/sh
umask 077

answers() {
    echo Country
    echo County
    echo Town
    echo Organisation
    echo Unit
    echo FQDN
    echo root@FQDN
}

PEM1=`/bin/mktemp /tmp/openssl.XXXXXX`
PEM2=`/bin/mktemp /tmp/openssl.XXXXXX`
trap "rm -f $PEM1 $PEM2" SIGINT
answers | /usr/bin/openssl req -newkey rsa:2048 -keyout $PEM1 -nodes -x509 -days 3650 -out $PEM2 2> /dev/null
cat $PEM1 > selfsigned-priv.pem
cat $PEM2 > selfsigned-cert.pem
rm -f $PEM1 $PEM2

CC: (none) => mageia

Comment 6 Dave Hodgins 2021-08-26 23:40:55 CEST
Any chance firefox has previously been run as root after using just su to
become root?
https://wiki.mageia.org/en/Never_use_just_su

CC: (none) => davidwhodgins

Comment 7 Marc Mascré 2021-08-27 19:14:45 CEST
I have done some tests.
With a windows and firefox 91.0.2 it work
With Ubuntu and firefox 85.0.1 (before update) and 91.0.2 (after update) It work. (I have test a quick installation of ubuntu in virtualbox to check)

I ask myself if my configuration folder of firefox is not too old. It come from mageia 5 or 6 and the problem is appear with a new version of firefox. So I remove /home/user/.mozilla/ and let firefox create a new one. I add mozilla account to recover bookmarks, configuration, passwords ... And try again,  but the problem is still here.

I don't know if report this upstream is useful if I can't reproduce the problem on others distribution. 

Many time ago, I had talk about that on the French mailing list of mageia and at least one other user had the problem. Someone here had the problem too ?

@Dave Hodgins : sincerely, I don't thinks so. But how check to be sure ? Is remove /home/user/.mozilla/ enough ?
Comment 8 Lewis Smith 2021-08-27 21:44:47 CEST
@Martin : another tour de force!
> I do this, and it is working for me, using firefox-78.13.0-1.mga8
@Marc : please note comment 5 carefully, and try it.

Ever confirmed: 1 => 0
Status: NEW => UNCONFIRMED