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

pkcs12 - Bag attributes not written if -nokeys is used #24315

Open
ghostinpeace opened this issue May 1, 2024 · 2 comments
Open

pkcs12 - Bag attributes not written if -nokeys is used #24315

ghostinpeace opened this issue May 1, 2024 · 2 comments
Labels
branch: master Merge to master branch help wanted triaged: feature The issue/pr requests/adds a feature

Comments

@ghostinpeace
Copy link

Using -name seems to have no effect when exporting a .pfx file if the private key is not written.

Example:
Writing two files.

openssl pkcs12 -export -inkey key.pem -in cert.pem -name "friendly cert" -out withkey.pfx
openssl pkcs12 -export -nokeys -in cert.pem -name "friendly cert" -out nokey.pfx

Checking their content:

openssl pkcs12 -in filename

nokey.pfx does not appear to have bag attributes.
The certificate no longer appears to be friendly.

Version:

OpenSSL 3.3.0 9 Apr 2024 (Library: OpenSSL 3.3.0 9 Apr 2024)
@ghostinpeace ghostinpeace added the issue: bug report The issue was opened to report a bug label May 1, 2024
@t8m
Copy link
Member

t8m commented May 2, 2024

Is this a regression? If you try 3.0.x or 3.1.x versions does this still happen?

@ghostinpeace
Copy link
Author

ghostinpeace commented May 2, 2024

There seems to be the same problem with 1.1.1o but I have not tried with a 3.0 or 3.1 version.

@t8m t8m added branch: master Merge to master branch help wanted triaged: feature The issue/pr requests/adds a feature and removed issue: bug report The issue was opened to report a bug labels May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch: master Merge to master branch help wanted triaged: feature The issue/pr requests/adds a feature
Projects
None yet
Development

No branches or pull requests

2 participants