AndServer
AndServer copied to clipboard
How do I support https?
How do I support https? How to set it?
研究了两天,参考一下
//取得BKS类型的本地密钥库实例,这里特别注意:手机只支持BKS密钥库,不支持Java默认的JKS密钥库
参考交流
你用的是那份软件 生成了 bks 密钥库呢? 看截图 应该不是 keytools这个工具吧。
你用的是那份软件 生成了 bks 密钥库呢? 看截图 应该不是 keytools这个工具吧。
http://keystore-explorer.org/downloads.html 这个工具
Has anyone been able to implement HTTPS correctly? My certificate is fine, it loads and reads correctly. I think I have some bug when implementing it on the server, when I apply the sslContext, I keep trying to connect infinitely (until I turn off the server) and if I remove the sslContext works perfectly (http).
Has anyone been able to implement HTTPS correctly? My certificate is fine, it loads and reads correctly. I think I have some bug when implementing it on the server, when I apply the sslContext, I keep trying to connect infinitely (until I turn off the server) and if I remove the sslContext works perfectly (http).
You can provides more details information . For example , logcat 、implement code、operation
I was able to implement it. My problem was in the sslSocketInitializer(). When I called it, (guided by desperation) I copied the example above, and could not get it to work, finally I removed the arguments and put only sslSocketInitializer(socket -> {}) and it worked, it only gave me the warning that the certificate is autogenerated (which is the case) but I consider it solved.
I was able to implement it. My problem was in the sslSocketInitializer(). When I called it, (guided by desperation) I copied the example above, and could not get it to work, finally I removed the arguments and put only sslSocketInitializer(socket -> {}) and it worked, it only gave me the warning that the certificate is autogenerated (which is the case) but I consider it solved.
maybe you already solve this problem , I think so