gnome-shell-extension-gsconnect
gnome-shell-extension-gsconnect copied to clipboard
Error generating or parsing TLS Certificate
GSConnect: 43 (user) GJS: 16405 Session: x11 OS: Ubuntu 20.04.3 LTS GNOME Shell: 3.36.9 Meson: 0.53.2 Ninja: 1.10.0
/(?:cn|CN) ?= ?([^,\n]*)/.exec(...) is null
get@/home/manti/.local/share/gnome-shell/extensions/[email protected]/service/__init__.js:393:64
_initCertificate@/home/manti/.local/share/gnome-shell/extensions/[email protected]/service/backends/lan.js:182:13
start@/home/manti/.local/share/gnome-shell/extensions/[email protected]/service/backends/lan.js:440:18
_loadBackends@/home/manti/.local/share/gnome-shell/extensions/[email protected]/service/manager.js:251:25
start@/home/manti/.local/share/gnome-shell/extensions/[email protected]/service/manager.js:454:14
vfunc_startup@/home/manti/.local/share/gnome-shell/extensions/[email protected]/service/daemon.js:258:22
vfunc_handle_local_options@/home/manti/.local/share/gnome-shell/extensions/[email protected]/service/daemon.js:666:18
@/home/manti/.local/share/gnome-shell/extensions/[email protected]/service/daemon.js:729:17
It seems like there's probably a new version of openssl
making the rounds with different output we're failing to parse. Someone with this new version may have to figure out the difference and add an extra if-then clause to account for this.
It seems like there's probably a new version of
openssl
making the rounds with different output we're failing to parse. Someone with this new version may have to figure out the difference and add an extra if-then clause to account for this.
Yep, seems like this is because I've updated OpenSSL from 1.0.2 to 1.1.1g. I'll maybe try to check this issue, but I don't know how)
These are the two commands we parse output from:
-
Generate fingerprint (sha256sum of DER data):
https://github.com/GSConnect/gnome-shell-extension-gsconnect/blob/396ae953f965c5bbbc2a6e354c78b858b623f98c/src/service/init.js#L366
-
Extract device ID (CN):
https://github.com/GSConnect/gnome-shell-extension-gsconnect/blob/396ae953f965c5bbbc2a6e354c78b858b623f98c/src/service/init.js#L387
The certificate and private/public key pair are generated using this command (although you can just run the above on your existing certificate):
https://github.com/GSConnect/gnome-shell-extension-gsconnect/blob/396ae953f965c5bbbc2a6e354c78b858b623f98c/src/service/init.js#L337-L343
So if you can figure out how the output changes, it would just be a matter of something like:
let match = /(?:cn|CN) ?= ?([^,\n]*)/.exec(stdout);
if (match === null)
match = /new-regexp/.exec(stdout);
this.__common_name = match[1];
It occurs to me that it may be a change in CLI arguments though, but either way this should help point you in the right direction. If you're not familiar with JavaScript or just need some help, do ask :slightly_smiling_face:
See also: https://github.com/GSConnect/gnome-shell-extension-gsconnect/issues/1395#issuecomment-1159515032
I'm also getting this error. And it does not seem to be related to openssl in my case as openssl seems to be working perfectly fine otherwise.
This was working fine for me until I rebooted after making several changes on my laptop (applying a minor Ubuntu update, removing what I believe was a duplicate copy of glib2, probably a few other things).
And I should also note that in my case, this was not the only thing that broke. Pretty much all my Ubuntu user settings (desktop background, favorite apps, keyboard shortcuts, etc.) were wiped. And Google Chrome wouldn't start either. I was able to resolve all those other problems by reapplying/reinstalling, but did not have any luck with GSConnect so far. I reinstalled all relevant TLS/openssl packages as well as GSConnect itself.
Any other ideas?