toniebox-reverse-engineering / teddycloud

teddyCloud is an open source server replacement for the Boxine Cloud
https://toniebox-reverse-engineering.github.io/docs/tools/teddycloud/
GNU General Public License v2.0
404 stars 31 forks source link

Private keys are generated as DER, but have .pem file ending #115

Open pepe82sh opened 7 months ago

pepe82sh commented 7 months ago

ca-key.pem and teddy-key.pem are not in PEM format, but in DER format. I'd suggest to either change the names, or store them as PEM. Tried to implement, but cyclone seems unhappy. Is there a specific reason to use cyclone? Usually I would've expected an external dependency to openssl or something along those lines.

SciLor commented 7 months ago

We wanted to reduce external dependencies as much as possible for two reasons:

@g3gg0 what do you think of that? Changing the extension or converting it to pem?

pepe82sh commented 7 months ago

Spoiler: I tried adding a PR to this issue, but using pemExportRsaPrivateKey didn't work as straight forward as I hoped it would. A PEM file is generated, but using it causes an error. Openssl doesn't seem to be able to read the PEM file as well, so I guess it's somewhat malformed.