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

Cert export (.p12) corrupted #7251

Closed
schafskopf opened this issue Feb 15, 2024 · 5 comments
Closed

Cert export (.p12) corrupted #7251

schafskopf opened this issue Feb 15, 2024 · 5 comments
Labels
support Community support

Comments

@schafskopf
Copy link

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

The certificates issued by a CA on the OPNsense can no longer be exported in .p12 format. The files are corrupt after the download and cannot be opened or imported.
This was definitely functioning with version 23.7

To Reproduce

Steps to reproduce the behavior:

  1. Go to System: Trust: Certificates
  2. Click on "export ca+user cert + user key" on a self signed cert
  3. Try open or import the .p12 File
  4. File is corrupted

Expected behavior

A working .p12 File that i can use.

Describe alternatives you considered

export user cert and key file separately

Environment

OPNsense 24.1.1 (amd64).
DEC840

@AdSchellevis
Copy link
Member

not likely corrupted, format has changed due to openssl changing to version 3 (RC2-40-CBC being deprecated).

openssl -version
openssl pkcs12 -in my_cert.p12 -info

@AdSchellevis AdSchellevis added the support Community support label Feb 16, 2024
@schafskopf
Copy link
Author

You're right, it was in the release notes - I hadn't thought about it.
I'm not really a specialist when it comes to certificates, but somehow I can't manage to create a certificate that works to get access to the wifi. Before the update it was no problem.

I have now tried to convert the certificate into a .pem file. But this does not work either.

I see that the problem is not on the OPNsense side, so you can close the issue. I have to do my research.
Nevertheless, if you can give me a hint I am of course very thankful.

@AdSchellevis
Copy link
Member

I'm not 100% sure, but expect something like:

openssl pkcs12 -export -legacy -in cert.pem -inkey key.pem -out bundle.p12

@schafskopf
Copy link
Author

Thank you, this looked very promising. I now had a .p12 file that could also be opened via the GUI. However, the Wlan authentication still does not work. Maybe it is also related to Linux Mint. Previously I only had Fedora, popOS and Android clients. So it could also be related to Linux Mint. I will try again on another client when I get the chance.

I always have the following errors in the FreeRADIUS log:

  • ERROR: (549) eap_tls: ERROR: (TLS) Alert read:fatal:bad certificate
  • Auth: (549) Login incorrect (eap_tls: (TLS) Alert read:fatal:bad certificate): [/] (from client AP_ port 0 cli C8-F7----)

@schafskopf
Copy link
Author

Ok, it looks like it's a Linux Mint problem. I have no problems on another Linux OS with the same certificate. also without converting the certificate - so directly the .p12 file from the OPNsense.

Many thanks for your help.

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

No branches or pull requests

2 participants