yanzhenjie / AndServer

:cherries: Web server and web framework of Android platform.
https://yanzhenjie.com/AndServer
Apache License 2.0
3.74k stars 755 forks source link

configuration of .sslContext() version 2.1.12 #536

Closed plancha2002 closed 7 months ago

plancha2002 commented 7 months ago

Hi, I've been working on a small project for a few days, I have it fully implemented but in HTTP, I'm trying to implement HTTPS, and I can't do it. For these tests I made a new project. I've tried to implement sslContext() in different ways. Autogenerating the key with bouncycastle and uploading it to a sslContext, creating the certificate using KeyStoreExplorer, because in another issue I saw that I tried with bks format, but nothing, I always have the same problem. The server is up, but when I send a query to it, it keeps loading infinitely until the server is turned off. Any solution? or a demo that I can use to see where I'm wrong. Thanks.

plancha2002 commented 7 months ago

i fixed, i put .sslSocketInitializer(socket -> { many parameters}) and it didn't work, I left only the {} (.sslSocketInitializer(socket -> {})) and it worked, when I finish it I leave here the functional example for people who can use it.