标签: https

让 vim / curl 识别 https:// 链接

我最近注意到 vim/vimdiff 可以打开链接(似乎使用 curl),这是一个很棒的功能。我今天想用它,像这样:

vimdiff deps https://raw.github.com/symfony/symfony-standard/v2.0.10/deps

但是https://似乎也没有触发这种很棒的机制。此页面上没有身份验证,我认为https://只是为了提供数据加密。如何强制 vim 识别https://协议?

vim curl https

5
推荐指数
1
解决办法
549
查看次数

如何让 Firefox 知道本地系统 CA 证书?

最近,CAcert 根证书已从 Debian 中删除(更准确地说,从ca-certificates软件包中删除)。因为我想保留它们,所以我备份了目录

/usr/share/ca-certificates/cacert.org/
Run Code Online (Sandbox Code Playgroud)

.crt包含升级前的两个文件并将其复制到

/usr/local/share/ca-certificates/cacert.org/
Run Code Online (Sandbox Code Playgroud)

然后。然后我跑了update-ca-certificates

# update-ca-certificates 
Updating certificates in /etc/ssl/certs... 2 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....
Adding debian:cacert.org_class3.pem
Adding debian:cacert.org_root.pem
done.
done.
Run Code Online (Sandbox Code Playgroud)

看起来一切都很顺利。然而,Firefox (Iceweasel) 仍然拒绝由 CAcert 签名的证书,认为其不受信任。

有什么我错过的吗?我是否需要做一些特殊的事情才能让 Firefox 真正重新读取系统证书?

debian firefox ssl https certificates

5
推荐指数
1
解决办法
8289
查看次数

为什么 GCM HTTPS 不适用于 nginx?

由于这两个使用 GCM(Galois/Counter Mode)

www.ssllabs.com: ECDHE-RSA-AES256-GCM-SHA384
www.google.com: ECDHE-RSA-AES128-GCM-SHA256
Run Code Online (Sandbox Code Playgroud)

我们想让我们的网络服务器的 HTTPS 连接更安全(不要看自签名证书,现在还不算……)。

我们使用的是 OpenBSD 5.4 64 位操作系统,openssl ciphers命令说它支持ECDHE-RSA-AES256-GCM-SHA384密码。在客户端至少有 Firefox 30。

所以这里是我们设置HTTPS服务器的方法:

# generate self signed certificate
    openssl genrsa -aes256 -out /etc/ssl/private/server.key 4096
    openssl req -new -key /etc/ssl/private/server.key -out /etc/ssl/private/server.csr
    openssl x509 -sha512 -req -days 365 -in /etc/ssl/private/server.csr -signkey /etc/ssl/private/server.key -out /etc/ssl/server.crt
Run Code Online (Sandbox Code Playgroud)

配置:

vi /etc/nginx/nginx.conf
    ssl_protocols TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384;
    ssl_prefer_server_ciphers   on;
Run Code Online (Sandbox Code Playgroud)

但是 Firefox 说(我是用我的语言翻译的……):

与 www.foo.hu 的连接中断

ssllabs说:

评估失败:无法与安全服务器通信

  • 我们如何在 nginx 中设置 GCM?
  • 为什么新的 Firefox …

security openbsd openssl https

5
推荐指数
1
解决办法
604
查看次数

如果请求不是来自 localhost,则 Apache 重定向到 https

我有一台 Centos 6.7 和 apache 2.2.15。我想将所有流量从端口 80 重定向到 443,但有一个例外。来自 localhost 的流量我想保留在端口 80 上。

现在我使用这个配置,但我不知道如何更改它

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,QSA]
Run Code Online (Sandbox Code Playgroud)

centos https rewrite apache-httpd virtual-host

5
推荐指数
1
解决办法
4215
查看次数

PGP 密钥服务器具有通过 HTTPS 下载的功能?

我公司的防火墙阻止了端口 80 上的密钥服务器,我希望支持的一些发行版还不具备 HKPS 功能以通过 TLS 获取。

是否有提供通过 HTTPS 简单下载给定密钥的密钥服务器?例如,我可以在https://keybase.io/naftulikay/pgp_keys.asc上获取我自己的个人密钥,该密钥位于密钥库中

是否有资源可以在不使用密钥服务器协议的情况下通过 HTTPS 获取密钥?我正在编写 Ansible,因此通过 HTTPS 获取内容很容易。

https pgp

5
推荐指数
1
解决办法
540
查看次数

为 SSL 服务器生成证书签名请求

我正在运行 CentOS 6.2 LAMP 并且我刚刚通过 Namecheap 购买了一个 SSL 证书,我正在尝试将其安装在我的服务器上。是我购买的证书。

如何在不使用网络主机的情况下完成此过程?

到目前为止,我已经安装了 SSL yum install mod_ssl openssl,现在我被要求通过 NameCheap 提供 CSR 并选择我的服务器类型。

mod_sslopenssl无论是在那里的Apache2?

在此处输入图片说明

什么是 CSR,我该如何生成?

我在网上找到的教程都是使用自签名证书,这不是我想要的。

ssl openssl https apache-httpd

4
推荐指数
1
解决办法
3398
查看次数

如何列出为网页提供服务的每个端口

我有许多服务器,所有服务器都具有可通过各种端口访问的各种 HTTP(S) 服务。跟踪哪些服务在哪个主机和哪个端口上可用是非常困难的。通常我只是依赖我的浏览器历史记录。

是否有一些 shell 命令(netcat 的某些变体)或脚本可以从给定的服务器列出为网页提供服务的每个端口?或者每个端口都使用 HTTP 或 HTTPS?

shell shell-script http https netstat

4
推荐指数
1
解决办法
1692
查看次数

为所有证书链生成 HPKP 指纹

从下面的命令只能为第一个深度证书生成 Base64 引脚。但是需要为所有深度的证书生成pin。

openssl s_client -servername example.com -connect example.com:443 -showcerts 
| openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
Run Code Online (Sandbox Code Playgroud)

只给一把钥匙而不是三把,

cUPcTAZWKaASuYWhhneDttWpY3oBAkE3h2+soZS7sWs=
Run Code Online (Sandbox Code Playgroud)

那么,我们如何生成所有三个级别的引脚呢?

ssl openssl https

4
推荐指数
1
解决办法
1159
查看次数

到 gitlab.com 的 ssh 连接在家用路由器后面失败,但在工作场所时很好。然而,Github 和 Bitbucket over ssh 在家也可以

我正在尝试连接到我在 gitlab.com 上的存储库。

它曾经在我在家和工作时在我的笔记本电脑上工作。我正在使用 ssh 并将 ssh 密钥添加到 gitlab。

几天前突然停止在家工作:我得到:

$ git pull
Connection closed by 54.93.71.23
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

在我的工作网络中,在同一台笔记本电脑上使用 ssh 可以正常工作。

所以现在我切换到 https 并且它大部分时间都可以工作,但偶尔它会挂起,我得到:

fatal: The remote end hung up unexpectedly
error: RPC failed; result=56, HTTP code = 0
Run Code Online (Sandbox Code Playgroud)

从我的工作来看,这从未发生过,即使我尝试在半小时后提交相同的更改。

ssh 可能有什么问题?我是在路由器防火墙后面还是我的供应商改变了什么?

编辑 1: git pull 的输出,将 LogLevel DEBUG3 添加到我的 .ssh/config:

debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: …
Run Code Online (Sandbox Code Playgroud)

ssh git https

3
推荐指数
1
解决办法
1987
查看次数

如何发现域和 https 连接尝试 sshd?

我正在sshd(8)侦听domainhttps端口上运行。(还有什么可以在这些端口上运行?:)

显然,真正的 DNS(当回退到 TCP 时)和 HTTPS 客户端可能会尝试连接到我的 SSH 服务器,监听这些端口。如何找出它从 DNS/TCP 和 HTTPS/TCP 客户端收到的连接尝试次数?例如,是否有一些模式可以让我搜索服务器的日志,以查找 DNS/TCP 客户端或与 SSH 服务器通信的 HTTPS/TCP 客户端所独有的模式?是否有一些网络工具可以轻松显示这一点?

我已经链接了 OpenBSD/etc/servicessshd更高版本,所以我显然对如何在 OpenBSD 上执行此操作感兴趣。但是,如果有一种跨平台的方式来执行此操作,并且不特定于任何单个操作系统,请包含它。

dns port-forwarding https sshd

3
推荐指数
1
解决办法
434
查看次数

`curl` 如何在 macOS 中访问 SSL 证书?

我使用的是 macOS 10.15.5 的 Macbook。我有 MacPorts,但我使用的是curl.

% curl --version
curl 7.64.1 (x86_64-apple-darwin19.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.39.2
Release-Date: 2019-03-27
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL UnixSockets
Run Code Online (Sandbox Code Playgroud)

当我尝试 d/l 最新的时youtube-dl,我收到证书错误:

% sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time …
Run Code Online (Sandbox Code Playgroud)

curl https macos

2
推荐指数
1
解决办法
9994
查看次数

找不到页面,但页面在那里

我究竟做错了什么?

当我搜索https://teampass.domain.org/ 时,我看到一个空白屏幕。

当我搜索https://teampass.domain.org/teampass 时,出现以下错误。

Chrome 上的错误:

在此服务器上找不到请求的 URL /teampass/index.php。

IE 上的错误:

找不到网页

HTTP 404

这是对 web 文件夹的权限:

  root@teampass:/var/www/html# ls -l
    total 16
  -rwxrwxr-x. 1 www-data www-data 11510 Oct 30 09:36 index.html
  -rwxr-xr-x. 1 www-data www-data    49 Dec  4 11:01 index.php
  lrwxrwxrwx. 1 www-data www-data    20 Nov  3 16:44 teampass -> /opt/TeamPass-2.1.23
Run Code Online (Sandbox Code Playgroud)

这是文件夹包含的内容:

 root@teampass:/var/www/html/teampass# ls
 admin.php                      error.php         includes           load.php             tools
 admin.settings_api.php         favico.ico        index.php          otv.php              upload
 admin.settings_categories.php  favorites.php     items.export.php   profile.php          users.load.php
 admin.settings.load.php        files             items.import.php   readme.md            users.php
 admin.settings.php …
Run Code Online (Sandbox Code Playgroud)

ubuntu https apache-httpd

1
推荐指数
1
解决办法
3281
查看次数