【问题标题】:https check on serverhttps 检查服务器
【发布时间】:2015-06-27 11:28:31
【问题描述】:

我有一个部署在 azure 上的 tomcat 服务器,它有我的 REST API。到目前为止,我使用 HTTP 从我的 android 应用程序联系服务器并获得响应。今天,我向服务器添加了一个自签名证书,当我使用 android 应用程序(通过将 URL 更改为 https)进行测试时,一切正常。但是,我想确认响应是否真的被加密了。如何检查?

【问题讨论】:

  • 您好 - 我正在尝试做同样的事情,但想知道您是如何设法将自签名证书添加到服务器的?您是使用带有证书的嵌入式 tomcat 并将其上传到 azure 还是仅使用他们的外部 tomcat 服务器?

标签: tomcat https


【解决方案1】:

命令

curl -k -v https://github.com/corvusoft/restbed

输出

* Hostname was NOT found in DNS cache
*   Trying 192.30.252.129...
* Connected to github.com (192.30.252.129) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
* Server certificate: github.com
* Server certificate: DigiCert SHA2 Extended Validation Server CA
* Server certificate: DigiCert High Assurance EV Root CA
> GET /corvusoft/restbed HTTP/1.1
> User-Agent: curl/7.37.1
> Host: github.com
> Accept: */*
> 
< HTTP/1.1 200 OK
* Server GitHub.com is not blacklisted
< Server: GitHub.com
...

Curl 文档可以在here找到

-k, --insecure

(SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" fail unless -k, --insecure is used.


-v, --verbose

Be more verbose/talkative during the operation. Useful for debugging and seeing what's going on "under the hood". A line starting with '>' means "header data" sent by curl, '<' means "header data" received by curl that is hidden in normal cases, and a line starting with '*' means additional info provided by curl.

【讨论】:

  • 这很好用。但是,当我在服务器上运行 tcpdump 并在从应用程序调用 API 时捕获数据包时,我看不到任何 TLS 数据包。
  • @Meher 那么你就有答案了。
  • 感谢您的帮助:)
猜你喜欢
  • 2020-03-01
  • 2016-10-31
  • 2019-04-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-10-22
相关资源
最近更新 更多