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

XEP 0178 PEM password prompt despite no password on the p12 encrypted certificate #204

Closed
deadheadjp opened this issue Apr 14, 2022 · 0 comments · Fixed by #205
Closed

Comments

@deadheadjp
Copy link

While implementing the XEP 0178 in my libstrophe client, I used the easy-rsa generated certificates without password using the command:
./easyrsa --subject-alt-name="otherName:1.3.6.1.5.5.7.8.5;UTF8:[email protected]" gen-req "[email protected]" nopass

The nopass option means that the created certificate has no PEM password.

Following the chain of commands I finally export the certificate into p12 file and use it to authenticate with a server in my strophe based program using the provided API.
I am getting prompted about the PEM password in shell while running the program. I need to pass empty string "" to get through this step. As a workaround, I implemented a password callback that inputs the empty string automatically, but I presume that the password prompt should not be shown, or at least it could be documented that it happens and that the callback needs to be added.

@sjaeckel sjaeckel changed the title XEP 0178 PEM password prompt despite no password on the p12 encrytped certificate XEP 0178 PEM password prompt despite no password on the p12 encrypted certificate May 5, 2022
sjaeckel added a commit that referenced this issue May 5, 2022
Before this change the user had to provide a password callback, even if the
PKCS#12 encoded file has no or an empty password.

This changes the behavior, so we first try to open the file without a
password and only then ask the user to provide one.

This fixes #204.

Signed-off-by: Steffen Jaeckel <[email protected]>
@sjaeckel sjaeckel mentioned this issue May 5, 2022
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

Successfully merging a pull request may close this issue.

1 participant