这与DST Root CA X3 过期(2021 年 9 月)
有关\n当在线搜索适用于旧服务器(在我的例子中是 Debian 8)的修复程序时,该服务器确实调用使用 LetsEncrypt 加密的站点curl,现在它们似乎失败了,并显示以下内容信息:
例子:
\ncurl -fsSL https://deb.nodesource.com/setup_14.x | bash -\nRun Code Online (Sandbox Code Playgroud)\n无提示地失败,然后手动尝试并删除无提示标志和 bash 管道,如下所示:
\ncurl -L https://deb.nodesource.com/setup_14.x\nRun Code Online (Sandbox Code Playgroud)\ncurl: (60) SSL certificate problem: certificate has expired\nMore details here: http://curl.haxx.se/docs/sslcerts.html\n\ncurl performs SSL certificate verification by default, using a "bundle"\n of Certificate Authority (CA) public keys (CA certs). If the default\n bundle file isn\'t adequate, you can specify an alternate file\n using the --cacert option.\nIf this …Run Code Online (Sandbox Code Playgroud) 我已安装并配置:
ServerA证书由自定义CA Root生成
我已将CA根证书放在ServerB上:
/srv/gitlab-runner/config/certs/ca.crt
Run Code Online (Sandbox Code Playgroud)
按照容器中的Run GitLab Runner中的描述在ServerB上安装Runner - Docker镜像安装和配置:
docker run -d --name gitlab-runner --restart always \
-v /srv/gitlab-runner/config:/etc/gitlab-runner \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:latest
Run Code Online (Sandbox Code Playgroud)
docker run --rm -t -i
-v /srv/gitlab-runner/config:/etc/gitlab-runner
--name gitlab-docker-runner gitlab/gitlab-runner register \
--non-interactive \
--executor "docker" \
--docker-image alpine:latest \
--url "https://MY_PRIVATE_REPO_URL_HERE/" \
--registration-token "MY_PRIVATE_TOKEN_HERE" \
--description "MyDockerServer-Runner" \
--tag-list …Run Code Online (Sandbox Code Playgroud) 以下代码读取macOS中的根证书.
我只是想知道iOS中的等效代码是什么?
https://github.com/HaxeFoundation/hxcpp/blob/7bd5ff3/src/hx/libs/ssl/SSL.cpp#L455-L491
CFMutableDictionaryRef search;
CFArrayRef result;
SecKeychainRef keychain;
SecCertificateRef item;
CFDataRef dat;
sslcert *chain = NULL;
// Load keychain
if( SecKeychainOpen("/System/Library/Keychains/SystemRootCertificates.keychain",&keychain) != errSecSuccess )
return null();
// Search for certificates
search = CFDictionaryCreateMutable( NULL, 0, NULL, NULL );
CFDictionarySetValue( search, kSecClass, kSecClassCertificate );
CFDictionarySetValue( search, kSecMatchLimit, kSecMatchLimitAll );
CFDictionarySetValue( search, kSecReturnRef, kCFBooleanTrue );
CFDictionarySetValue( search, kSecMatchSearchList, CFArrayCreate(NULL, (const void **)&keychain, 1, NULL) );
if( SecItemCopyMatching( search, (CFTypeRef *)&result ) == errSecSuccess ){
CFIndex n = CFArrayGetCount( result );
for( …Run Code Online (Sandbox Code Playgroud) 我已经设法为ARMv6交叉编译OpenSSL以与Android NDK一起使用并让它在我的应用程序中运行.但是,在尝试与知名主机(例如https://google.com)建立HTTPS连接时,我始终收到错误"SSL证书无效".
但是,我可以在任何设备的浏览器(股票浏览器,Chrome,Firefox等)中显示安全页面.因此,我只能假设OpenSSL没有找到存储在设备上的根证书.
然后我的问题分为两个非常相关的子问题:
tl; dr:使用自定义 CA 而不将其添加到持久密钥库。
我正在编写一个应该使用 HTTPS 连接到远程服务器的 Java 应用程序。连接代码已准备就绪,但是服务器的 SSL 证书是由StartSSL签名的,它不在 Java 的 CA 根证书存储中。
使用此代码,我可以从以下网站获得有效的证书信息https://www.google.com/:
Response Code : 200
Cipher Suite : TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
Cert Type : X.509
Cert Hash Code : -1643391404
Cert Public Key Algorithm : RSA
Cert Public Key Format : X.509
Cert Type : X.509
Cert Hash Code : 771393018
Cert Public Key Algorithm : RSA
Cert Public Key Format : X.509
Cert Type : X.509
Cert Hash Code : …Run Code Online (Sandbox Code Playgroud) 我正在尝试建立与java运行SSLServerSocket的安全连接.
我创建了自己的根CA,并使用此证书签署了Java SSLServerSocket的证书.
我想将此根证书添加到我的应用程序,以便根证书签署的任何证书都可以.
到目前为止,我通过将读取和写入流属性设置为此来使安全连接正常工作:
NSDictionary *settings = [[NSDictionary alloc] initWithObjectsAndKeys:
(id)kCFStreamSocketSecurityLevelNegotiatedSSL, kCFStreamPropertySocketSecurityLevel,
[NSNumber numberWithBool:YES], kCFStreamSSLAllowsExpiredCertificates,
[NSNumber numberWithBool:YES], kCFStreamSSLAllowsExpiredRoots,
[NSNumber numberWithBool:NO], kCFStreamSSLValidatesCertificateChain,nil];
Run Code Online (Sandbox Code Playgroud)
我将证书添加到钥匙串,如下所示:
-(void)addRootCert{
NSString* rootCertPath = [[NSBundle mainBundle] pathForResource:@"rootCA" ofType:@"der"];
NSData* rootCertData = [NSData dataWithContentsOfFile:rootCertPath];
OSStatus err = noErr;
SecCertificateRef rootCert = SecCertificateCreateWithData(kCFAllocatorDefault, (__bridge CFDataRef)rootCertData);
NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:(__bridge_transfer id)kSecClassCertificate, kSecClass, rootCert, kSecValueRef, nil];
err = SecItemAdd((__bridge CFDictionaryRef) dict, NULL);
if (err == noErr) {
NSLog(@"Sucessfully added root certificate");
}else if (err == errSecDuplicateItem){
NSLog(@"Root certificate already exists"); …Run Code Online (Sandbox Code Playgroud) 我正在使用 certifi python 模块来验证 ssl 连接。我查看了 certifi (python2.7/site-packages/certifi/cacert.pem) 中包含的根证书,其中一些证书已过期。如何更新这些证书?我尝试使用 pip 更新 certifi 包,但这只会更新包而不是根 CA 文件。
我目前正在将一个.net-core web-api部署到rhel 7.1上的docker容器中.一切都按预期工作,但从我的应用程序,我需要通过https调用其他服务,这些主机使用由自我维护的根证书签名的证书.
在这个星座中,我在调用此服务时遇到ssl-errors(ssl无效),因此我需要在docker-container中安装此root-certificate或以某种方式在.net-core应用程序中使用root-certificate.
如何才能做到这一点?有没有最好的做法来处理这种情况?.net-core会访问rhel系统上正确的密钥库吗?