最近开发一个需求,涉及获取服务端https证书.一般进行https调用我们都不太关心底层细节,直接使用WebClient或者HttpWebRequest来发送请求,这两种方法都无法获取证书信息,需要用到ServicePoint,这个类用于提供HTTP连接的管理. 写个Demo,拿新浪首页试一下: using System; using System.Net; using System.Security.Cryptography.X509Certificates; namespace GetSer…
使用wget获取 https资源,缺省命令下是要使用证书,如果还未安装证书,可以选择忽略. 例如没有github.com的证书,执行如下命令 mkdir -p model cd model wget https://github.com/dmlc/web-data/raw/master/mxnet/neural-style/model/vgg19.params cd .. mkdir -p input cd input wget https://github.com/dmlc/web-data/…