Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DES default #218

Closed
dirkx opened this issue Aug 1, 2023 · 2 comments
Closed

DES default #218

dirkx opened this issue Aug 1, 2023 · 2 comments

Comments

@dirkx
Copy link

dirkx commented Aug 1, 2023

The DES default is getting a bit long in the tooth; and I am seeing the first OpenSSL 3 based SCEP counterparts starting to no longer support it.

May be as simple as going AES; or a flag

diff --git a/scep/scep.go b/scep/scep.go
index c01f9bd..d617230 100644
--- a/scep/scep.go
+++ b/scep/scep.go
@@ -466,6 +466,7 @@ func (msg *PKIMessage) Success(crtAuth *x509.Certificate, keyAuth *rsa.PrivateKe
        }
 
        // encrypt degenerate data using the original messages recipients
+        pkcs7.ContentEncryptionAlgorithm = pkcs7.EncryptionAlgorithmAES128CBC // default is DES,CBC
        e7, err := pkcs7.Encrypt(deg, msg.p7.Certificates)
        if err != nil {
                return nil, err
@@ -571,6 +572,7 @@ func NewCSRRequest(csr *x509.CertificateRequest, tmpl *PKIMessage, opts ...Optio
                }
                return nil, errors.New("no CA/RA recipients")
        }
+        pkcs7.ContentEncryptionAlgorithm = pkcs7.EncryptionAlgorithmAES128CBC // default is DES,CBC
        e7, err := pkcs7.Encrypt(derBytes, recipients)
        if err != nil {
                return nil, err

@stv0g
Copy link

stv0g commented Aug 22, 2024

After #233 has been merged, this is not relevant for this repo anymore.

@dirkx Can you close this issue? I will open one in https://github.com/smallstep/scep

@dirkx
Copy link
Author

dirkx commented Aug 22, 2024

Replaced/moved to smallstep/scep#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants