我尝试使用终端更新我的 OS Debian jessie,但出现错误:
“E: The method driver /usr/lib/apt/methods/https could not be found.” error?
Run Code Online (Sandbox Code Playgroud)
我的 sources.list :
deb http://httpredir.debian.org/debian/ jessie main
deb-src http://httpredir.debian.org/debian/ jessie main
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main
# jessie-updates, previously known as 'volatile'
deb http://httpredir.debian.org/debian/ jessie-updates main
deb-src http://httpredir.debian.org/debian/ jessie-updates main
deb http://ftp.de.debian.org/debian jessie main
Run Code Online (Sandbox Code Playgroud)
如何修复apt-get update
和aptitude update
?
通过 HTTPS 向 url 发出 GET 请求并获取原始未解析响应的最直接方法是什么?
这可以通过 curl 实现吗?如果是这样,您需要使用哪些选项?
随着 NSA 披露的所有偏执狂,我想知道为什么 Debian 软件包安装机制不支持 HTTPS 进行传输,更不用说默认使用 HTTPS 了。
我知道 Debian 软件包使用 GPG 进行某种签名验证,但是,考虑到这在安全方面的重要性,我仍然认为使用 HTTPS 传输而不是 HTTP 会太难。
编辑:我主要想保护自己免受中间人攻击(包括只是流量嗅探),而不是 Debian 镜像管理员。HTTP 存储库将整个系统放在桌面上,供任何窥探 Debian 镜像流量的人使用。
我正在尝试在我的 apache2 网络服务器上设置 SSL,但它似乎根本不起作用。
我已经按照教程使用 openssl 创建证书文件并/etc/apache2/sites-available/default-ssl.conf
正确配置。
每次我尝试使用 https 打开我的网站时,由于安全问题,我的浏览器拒绝连接。它说我没有正确配置我的网站。
在我的/var/log/apache2/error.log
我收到警告,说我的服务器证书不包含与服务器名称匹配的 ID。
[Mon Apr 10 11:03:24.041813 2017] [mpm_prefork:notice] [pid 1222] AH00169: caught SIGTERM, shutting down
[Mon Apr 10 11:03:30.566578 2017] [ssl:warn] [pid 661] AH01909: 127.0.0.1:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 10 11:03:31.579088 2017] [ssl:warn] [pid 1194] AH01909: 127.0.0.1:443:0 server certificate does NOT include an ID which matches the server name
[Mon Apr 10 11:03:31.592958 2017] [mpm_prefork:notice] [pid …
Run Code Online (Sandbox Code Playgroud) 我使用以下 Makefile使用Let's Encrypt 推荐为 foo.localhost 创建了一个自签名证书:
include ../.env
configuration = csr.cnf
certificate = self-signed.crt
key = self-signed.key
.PHONY: all
all: $(certificate)
$(certificate): $(configuration)
openssl req -x509 -out $@ -keyout $(key) -newkey rsa:2048 -nodes -sha256 -subj '/CN=$(HOSTNAME)' -extensions EXT -config $(configuration)
$(configuration):
printf "[dn]\nCN=$(HOSTNAME)\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:$(HOSTNAME)\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth" > $@
.PHONY: clean
clean:
$(RM) $(configuration)
Run Code Online (Sandbox Code Playgroud)
然后我将它分配给了一个网络服务器。我已经验证服务器返回相关证书:
$ openssl s_client -showcerts -connect foo.localhost:8443 < /dev/null
CONNECTED(00000003)
depth=0 CN = foo.localhost
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 CN = …
Run Code Online (Sandbox Code Playgroud) 我的理解是,在 ssl 协商期间,客户端(即 curl)向服务器发送一个密码列表,服务器用其首选选项进行回复。
如何查看 curl 发送的密码列表?
我想从我的桌面查看所有传出 HTTP 请求的列表。我认为应该可以使用服务器名称指示 (SNI) 监控本地客户端的 HTTPS 主机名。
OS X 有一个很好的 GUI 实用程序,称为Little Snitch,它是一个基于应用程序的 HTTP 监视器和防火墙规则前端。
我会满足于一个不错的终端实用程序。tcpdump
是矫枉过正,因为我只想实时查看流量的去向而不是传输的数据。理想情况下,我也想看看是什么进程发出了请求,但只要看看是什么拨号回家就不错了。
我正在使用 Debian wheezy,我想安装这个包apt-transport-https
,它允许通过https
协议访问 apt 存储库。
真正apt-get
让我困惑的是,它给了我以下信息:
$ sudo apt-get install apt-transport-https
...
The following NEW packages will be installed:
apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 109 kB of archives.
After this operation, 166 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
apt-transport-https
Install these packages without verification [y/N]?
Run Code Online (Sandbox Code Playgroud)
我按下N
是因为我想在安装软件包之前澄清这一点。为什么没有提供此包的身份验证信息?我希望这是默认设置,特别是对于提供安全传输协议的包。
我正在尝试使用 openssl s_client 选项测试在 Web 浏览器中正常工作的服务器,使用 openssl 直接连接它返回 400 Bad Request:
openssl s_client -servername example.com -connect example.com:443 -tls1
(some information about the certificate)
GET / HTTP/1.1
(and the error occurs **immediately** - no time to include more headers like Host:)
Run Code Online (Sandbox Code Playgroud)
重要提示:我已经尝试放置 Host: 标头,问题是当我运行 GET 时,错误立即发生,让我没有机会包含更多标头。将 example.com 替换为我的主机...
https ×10
apt ×3
curl ×3
debian ×3
http ×2
openssl ×2
ssl ×2
apache-httpd ×1
monitoring ×1
networking ×1
privacy ×1
proxy ×1
security ×1
software-rec ×1
telnet ×1
webserver ×1