Can't add certificate (cannot decode pem certificate)

I read this: Custom SSL certs for snapd to the snap store communication
And I wanted to add HTTP Debugger certificate to monitor my snap connections, to see what it does, for example to find direct url of one snap which is 300 MB so I can download it manually with resume support or better software. I use HTTP Debugger in Windows 10 and I use Ubuntu on VMWare player. I already succeeded adding the same certificate to system by adding it to dir /usr/local/share/ca-certificates/ using command: sudo update-ca-certificates
I exported certificate from Windows 10 as base64 encoded, the same format FIrefox uses on Ubuntu in some folder where it keeps certs. I tried renaming both to crt and cer.
Command used and result:

nijaz@nijaz-virtual-machine:~$ sudo snap set system store-certs.cert1="$(cat /mnt/hgfs/LinuxAnalysis/httpdebugger-cer.cer)"
    bash: warning: command substitution: ignored null byte in input
    [sudo] password for nijaz: 
    error: cannot perform the following tasks:
    - Run configure hook of "core" snap (run hook "configure": cannot decode pem certificate "cert1")

Here is exact content of cert, in case you wanna try:

-----BEGIN CERTIFICATE-----
MIIDIjCCAgqgAwIBAgIRANwOmFo7+yLGYf1CxLdbqN8wDQYJKoZIhvcNAQELBQAw
OTELMAkGA1UEBhMCRU4xKjAoBgNVBAMMIUhUVFAgREVCVUdHRVIgQ0EgZm9yIERF
QlVHIE9OTFkgMjAgFw0wMTA1MTgxMjU1MDlaGA8yMDYxMDUwMzEyNTUwOVowOTEL
MAkGA1UEBhMCRU4xKjAoBgNVBAMMIUhUVFAgREVCVUdHRVIgQ0EgZm9yIERFQlVH
IE9OTFkgMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANEC+sWUcfJF
ToC57ghh7WvGLDrfx5lIp0yrZDEiHXtx32GqAFokXmwzJ82iDVwIrbDSIf62NBQ5
zt5NENdk5oi36rwYlDNWMTEs8rtwGMWJuiZRMaleVPVjL1Ecf2T4cCWiGw83qvNy
WDAd4OaYV0DCvBe3YPR7bOKrznwEv/Eycp+NiBOkpidYnyrdb/A4gsMBuEKYjIQ3
z5lrrEuAUrpJADf2jlxTTJ7ede1Dmyga1yzoOeAuc0ZLEJKaqNG2cwK+tOZ9W7OL
/KmHgY/+FhMOd9xzuJoEJnFycjn5x7Ha1+GyScMPUacT3Z3X9+ukYXyQriyAavLO
wwTYdZ4hn+ECAwEAAaMjMCEwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
AQYwDQYJKoZIhvcNAQELBQADggEBALBfjIKemgBczseh0HYvcxNKua7OoK+2wb/V
qaEzbbb6ftbXdVuE7a7TmEEmS0k+OJlA20kPZ1tAYByLVLrqOqmSK+X1WH2zAQCV
P+oPKsW+01Q/Ittc82Tc7j6MG9fuuSXUz4SlyAK2/DpNbfxZEC7LOi99QFK2Zxka
khD2b+ldASyZuiCZyG4n3DIoPh/ecrsVPM9XGtfjVrRUqX3mzsdsc8IyUD+hMqU2
zgi1meLMaYJiSiJpUn7Sak+UQ2YvY97EIt0p1M2kBHSd1AEWaNC3e5K+J+tqtQ40
3DYP2SsxqePrtiTZbf7cXinGyrqCe87vQAYSFzt0mgsHcsx6glA=
-----END CERTIFICATE-----

OMG, figured out what it was. Only carriage returns were different. When I re exported that certificate from computer registry in Windows 10 as der format but not encoded as base64, then put it into Ubuntu, and converted it to base64 encoded form via terminal (openssl x509 -inform DER in httpdebugger-cer.cer -out http.crt) it now worked (vs when directly exporting base64 encoded der from Windows computer certificates)! I analyzed file difference between two base64 encoded der files (crt or cer extension is not important), and the only difference were carriage returns, in non working file it was Windows, in working file it was Unix. Or when I ignore carriage return differences, files were detected as same by WinMerge. Conclusion: Looks like snap does not support Windows carriage returns while Linux system-wide does as in sudo update-ca-certificates. Meaning it does not support those certificate exported as der base64 encoded from Windows computer certificates, but does if they have unix carriage return, modified either by openssl or notepad++ and other apps. Proof (sorry for bit low resolution, have some uploading bug for larger images):

And proof that it works in HTTP Debugger, found direct link and all I wanted!

And proof that such direct link can be then downloaded via download managers like IDM and is resumable, vs snap which can’t resume downloads if connections was broken in the meantime. Does not need special headers or cookies. Reason why I needed this is to be able to install later offline even on another system, and prevent automatic updates (snap refreshes) which I plan to do with command like: snap install --dangerous core18_1997.snap and because I had extremely unstable internet and proxy, which always drop connection before snap finishes downloading large file, either because weak 3g signal or buggy proxy app (your freedom vpn). Of course I may have to download few dependencies of snap too which I noticed appear during mentioned command line, and install each dependency separately. Also aware that to fully avoid refreshing (updating) of all snap apps I have to remove and download in same way (–dangerous) all snap apps, even those few that were installed by system in the beginning.
c

4