micromdm / scep

Go SCEP server
MIT License
310 stars 121 forks source link

docker server not start with PKCS#8 key #204

Closed PikuZheng closed 1 year ago

PikuZheng commented 1 year ago

since openssl 3.0 , it uses PKCS#8(BEGIN PRIVATE KEY) instead of PKCS#1(BEGIN RSA PRIVATE KEY). with PKCS#8,docker server not start with error

level=info ts=2022-09-07T09:44:50.802443095Z caller=scepserver.go:135 err="unmatched type or headers"

with PKCS#1,docker server not start with error

level=info ts=2022-09-07T14:53:33.663932135Z caller=scepserver.go:135 err="x509: no DEK-Info header in block"

so which format is correct and how to convent with openssl?

PikuZheng commented 1 year ago

fixed with

openssl.exe rsa -traditional -in ca.key -outform PEM -out ca_pkcs#1.key -passout pass:123456  -aes256