Bug 28951 - I can't request a certificate of FNMT web
Summary: I can't request a certificate of FNMT web
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-20 13:00 CEST by Jose Manuel López
Modified: 2021-05-25 12:26 CEST (History)
1 user (show)

See Also:
Source RPM: Firefox and java
CVE:
Status comment:


Attachments

Description Jose Manuel López 2021-05-20 13:00:57 CEST
Description of problem: I cant't request a certificate of FNMT web. The button links to a java application of FNMT, that previously I have installed in Mageia with rpm package downloaded from the FNMT website.

Version-Release number of selected component (if applicable): Firefox - Java - Mageia 8


How reproducible: Go to https://www.sede.fnmt.gob.es/certificados/certificado-de-representante/persona-juridica/solicitar-certificado, and complete fields. after click in "Enviar petición". After, appears: Imposible crear esclavo de E/S. klauncher ha respondido: Protocolo desconocido <fnmtrc>.


Steps to Reproduce:
1. Go to https://www.sede.fnmt.gob.es/certificados/certificado-de-representante/persona-juridica/solicitar-certificado
2. Complete the fields
3. Click in "Enviar petición"
Comment 1 katnatek 2021-05-20 20:29:42 CEST
I suspect  the issue is the FMT package fail to register the fnmtrc protocol in
mageia, if the package contain a file.js that register the protocol, something like

pref("network.protocol-handler.app.fnmtrc",path_to_application);

create or edit the file user.js and add that line(s) changing pref for user_pref

or as root copy the file.js to /usr/lib/firefox/browser/defaults/preferences/
(or /usr/lib64/firefox/browser/defaults/preferences/ if is a 64bit sistem)

BTW why not use /etc/firefox/pref to that files like in debian-like sistems?
Comment 2 katnatek 2021-05-20 20:31:57 CEST
(In reply to katnatek from comment #1)
> I suspect  the issue is the FMT package fail to register the fnmtrc protocol
> in
> mageia, if the package contain a file.js that register the protocol,
> something like
> 
> pref("network.protocol-handler.app.fnmtrc",path_to_application);
> 
> create or edit the file user.js and add that line(s) changing pref for
> user_pref
> 
this file go in the firefox profile inside .mozilla folder
Comment 3 Aurelien Oudelet 2021-05-21 02:59:15 CEST
Hi, thanks reporting this.

@Jose, did you try katnatek advice in comment 2?

Status: NEW => NEEDINFO
CC: (none) => ouaurelien

Comment 4 Jose Manuel López 2021-05-21 08:43:38 CEST
Hi,

This solution don't works. I have seen that the ConfiguradorFNMT application, create a file "configuradorfnmt.js" in /usr/lib64/firefox/defaults/pref with this lines:

pref("network.protocol-handler.app.fnmtcr","/usr/bin/configuradorfnmt");
pref("network.protocol-handler.warn-external.fnmtcr",false);
pref("network.protocol-handler.external.fnmtcr",true);

I have a virtual machine with Mageia 7 and the application works fine. Firefox open the application after click the button in FNMT web.


Apparently, the ConfiguradorFNMT installation is same in Mageia7 how Mageia8, but in Mageia 8 don't work.
Comment 5 katnatek 2021-05-21 23:23:03 CEST
(In reply to Jose Manuel López from comment #4)
Maybe need to be run with java 1.8.0, open firefox in terminal and 
attach the output of the process to get the certificate
Comment 6 katnatek 2021-05-22 01:20:33 CEST
I made some test and this application integrate the oracle java 1.8.0, so the java version is not the issue

So now i suspect one (or the) issue is that /usr/share/applications/configuradorfnmt.desktop
not link the application with the protocol so as root edit that file add the line after Icon line

[Desktop Entry]
Encoding=UTF-8
Version=1.0.1
Type=Application
Terminal=false
Exec=/usr/bin/configuradorfnmt %u
Name=configuradorfnmt
Icon=/usr/lib/configuradorfnmt/configuradorfnmt.png
MimeType=x-scheme-handler/fnmtcr;

And run

update-menus


Also in about:config search network.protocol-handler and check if all the values related are present, i have to install mageia's firefox to check this and is correct but is better be sure
Comment 7 Jose Manuel López 2021-05-24 08:46:55 CEST
Hi all, 

I have tried the solution of Katnatek of comment 6. Now, the complement work fine, but if in Mageia 7 the ConfiguradorFNMT works fine (in firefox the protocol was correct) , I think that in Mageia 8 we have a problem with the installation, because it don't make things correctly.

I think that Mageia 8 isn't installing fine the application, And that line is left unadded to the file.

I don't know if we should close this bug or we should applicate others corrections.

Greetings!!
Comment 8 katnatek 2021-05-24 19:43:29 CEST
(In reply to Jose Manuel López from comment #7)

The distribution and desktops are improving/changing with the time
one of that change is fit to standards, not much time ago (mageia < ( = ?) 6 ? )
you can have a text file containing a command and not shebang,
create a launcher to that file and it works, since mageia 7 you have to put the shebang  before the command (and as first line or some tools complain about it)
or you receive

execvp: Formato de ejecutable incorrecto 

in english some like

execvp: Wrong executable format

This need to be reported to FNMT asking to include the missing line to desktop file
Comment 9 Jose Manuel López 2021-05-25 12:26:46 CEST
(in reply to katnatek from comment #8)

I have reported this bug to FNMT and I wait that they have it in consideration for update their application.

If I have news of this, I will comment here.

We can close this bug waiting for FNMT will update their application.

Greetings!!

Status: NEEDINFO => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.