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

can't connect self-signed certificate server #133

Closed
llj098 opened this issue Apr 20, 2024 · 1 comment
Closed

can't connect self-signed certificate server #133

llj098 opened this issue Apr 20, 2024 · 1 comment

Comments

@llj098
Copy link

llj098 commented Apr 20, 2024

What is wrong?

can't connect the self-signed certificate server:

SSLHandshakeException: Read error:ssl=0xb400007e09526188: Failure in SSL library,usually a protocol error
error:10000438:SSL routines:OPENSSL
internal:TLSV1 ALERT INTERNAL ERROR
(external/boringssl/src/ssl/tls record.cc:592
0xb400007e09382240:0x00000003)

Weixin Image_20240420155411

To Reproduce
Steps to reproduce the behavior:

  1. create a self-signed certificate server with:
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname"\n 

and a caddy file

localhost:62342 {
        tls cert.pem key.pem { }
        reverse_proxy :2342
}
  1. bundle the key and cert files by:
# Combine the certificate and the key.
cat cert.pem key.pem > pkcs12.pem
# Create a password-protected bundle.
openssl pkcs12 -in pkcs12.pem -export -out bundle.p12

from https://github.com/Radiokot/photoprism-android-client/wiki/How-to-connect-to-a-library-with-mTLS-(mutual-TLS)-auth%3F

  1. install the p12 file as vpn and apps
  2. use the certification to connect phtoprism server

Expected behavior
connect success

Screenshots

Weixin Image_20240420155411

Device (please complete the following information):

  • Model: xiaomi 13 utltra
  • Android version: 14

Additional context

I can connect with http successfully.

@llj098 llj098 added the bug Something isn't working label Apr 20, 2024
@Radiokot Radiokot removed the bug Something isn't working label Apr 20, 2024
@Radiokot
Copy link
Owner

Hi. It is not the bug in the app. It is capable of working with certificates signed by custom authorities if the chain is set up correctly and you have the CA certificate installed on your phone.
Please, follow this checklist: #130 (comment)

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