Giter VIP home page Giter VIP logo

httpsproject's Introduction

HttpsProject

第一步 Tomcat配置

直接去Tomcat的官网,查看响应的配置,我选择了HTTP1.0的TLS/SSL配置,根据官网文档对server.xml作相应的配置。

服务器环境使用Tomcat 9,放了一个json文件(tomcat.json)用来试验。

第二步 Android证书校验

port="8443" // HTTPS默认端口8443
type="RSA"  // 加密方式RSA
sslProtocol="TLS" // ssl协议版本 TLS

Android端的代码是根据Google Developer一步一步学习的,官方文档非常翔实,多看有益。

同时需要注意的是,如果是自签名的证书,需要自定义TrustManager,重写 checkServerTrusted方法校验证书是否和Android端预先存储的证书一致。

tips

目前我看过的关于Android HTTPS知识讲解最棒的一篇博客

https://www.cnblogs.com/alisecurity/p/5939336.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.