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:


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.