AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-11292

l0b0's questions

Martin Hope
l0b0
Asked: 2014-01-26 09:43:43 +0800 CST

Jenkins 不会使用 CA 签名证书

  • 9

tl;博士固定

我已经使用自签名证书运行 Jenkins 实例一段时间了,除了必须在浏览器中创建证书验证异常的麻烦之外,它运行良好。所以今天我从StartSSL获得了一个免费的 tier 1 证书,更改了路径/etc/sysconfig/jenkins,并重新启动了服务,但它根本不起作用:

$ openssl s_client -connect localhost:8080 -debug
CONNECTED(00000003)
write to 0xdce210 [0xdeeca0] (171 bytes => 171 (0xAB))
0000 - 16 03 01 00 a6 01 00 00-a2 03 03 52 e3 f5 18 90   ...........R....
0010 - e2 24 10 6a 6e ee 24 88-cd 52 e8 a8 0b 6f 71 85   .$.jn.$..R...oq.
0020 - 3f 5b a1 53 7b 2c 74 fe-a2 68 25 00 00 54 00 a3   ?[.S{,t..h%..T..
0030 - 00 9f 00 6b 00 6a 00 39-00 38 00 88 00 87 00 9d   ...k.j.9.8......
0040 - 00 3d 00 35 00 84 00 16-00 13 00 0a 00 a2 00 9e   .=.5............
0050 - 00 67 00 40 00 33 00 32-00 9a 00 99 00 45 00 44   [email protected]
0060 - 00 9c 00 3c 00 2f 00 96-00 41 00 07 00 05 00 04   ...<./...A......
0070 - 00 15 00 12 00 09 00 14-00 11 00 08 00 06 00 03   ................
0080 - 00 ff 01 00 00 25 00 23-00 00 00 0d 00 18 00 16   .....%.#........
0090 - 06 01 06 02 05 01 05 02-04 01 04 02 03 01 03 02   ................
00a0 - 02 01 02 02 01 01 00 0f-00 01 01                  ...........
read from 0xdce210 [0xdf4200] (7 bytes => 0 (0x0))
140506493065056:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:177:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 171 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---

/var/log/jenkins/jenkins.log或中没有错误指示/var/log/messages。

openssl似乎认为我的证书是合法的:

openssl x509 -in jenkins.crt.pem -text -noout
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 925667 (0xe1fe3)
    Signature Algorithm: sha1WithRSAEncryption
        Issuer: C=IL, O=StartCom Ltd., OU=Secure Digital Certificate Signing, CN=StartCom Class 1 Primary Intermediate Server CA
        Validity
            Not Before: Jan 24 16:19:28 2014 GMT
            Not After : Jan 25 15:09:34 2015 GMT
[...]

将其放入 Java KeyStore 文件后,它似乎仍然有效(匿名 FQDN):

$ keytool -list -keystore jenkins.jks
Enter keystore password:  

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

jenkins_domain_tld, Jan 25, 2014, trustedCertEntry,
Certificate fingerprint (MD5): 3D:6A:AB:83:0B:E8:21:DF:C3:17:E9:88:AD:19:24:EE

旧的自签名证书密钥存储区没有太大区别:

$ keytool -list -keystore jenkins.jks.old
Enter keystore password:  

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

jenkins_domain_tld, Jan 11, 2014, PrivateKeyEntry, 
Certificate fingerprint (MD5): A6:4E:F6:E8:56:D1:30:5E:11:63:59:C0:AA:24:B2:4F

我尝试直接使用证书JENKINS_ARGS="--httpsCertificate=/var/lib/jenkins/jenkins.crt.pem --httpsPrivateKey=/var/lib/jenkins/jenkins.key.pem",但詹金斯根本不会启动:

Jan 25, 2014 5:22:47 PM winstone.Logger logInternal
SEVERE: Container startup failed
java.io.IOException: Failed to start a listener: winstone.HttpsConnectorFactory
        at winstone.Launcher.spawnListener(Launcher.java:209)
        at winstone.Launcher.<init>(Launcher.java:149)
        at winstone.Launcher.main(Launcher.java:354)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:622)
        at Main._main(Main.java:293)
        at Main.main(Main.java:98)
Caused by: java.io.IOException: DerValue.getBigInteger, not an int 48
        at sun.security.util.DerValue.getBigInteger(DerValue.java:508)
        at winstone.HttpsConnectorFactory.readPEMRSAPrivateKey(HttpsConnectorFactory.java:171)
        at winstone.HttpsConnectorFactory.start(HttpsConnectorFactory.java:90)
        at winstone.Launcher.spawnListener(Launcher.java:207)
        ... 8 more

安装中间证书后:

$ keytool -list -keystore jenkins.jks
Enter keystore password:  

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 3 entries

sub.class1.server.ca, Jan 25, 2014, trustedCertEntry,
Certificate fingerprint (MD5): 30:B0:5A:F7:B2:F4:BE:0C:28:67:15:EA:CC:5B:24:20
ca, Jan 25, 2014, trustedCertEntry,
Certificate fingerprint (MD5): 22:4D:8F:8A:FC:F7:35:C2:BB:57:34:90:7B:8B:22:16
jenkins_domain_tld, Jan 25, 2014, trustedCertEntry,
Certificate fingerprint (MD5): 3D:6A:AB:83:0B:E8:21:DF:C3:17:E9:88:AD:19:24:EE

爪哇版:

java version "1.7.0_51"
OpenJDK Runtime Environment (IcedTea 2.4.4) (ArchLinux build 7.u51_2.4.4-1-x86_64)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

这似乎并没有改变什么。

据我所知,设置JENKINS_DEBUG_LEVEL="99"没有产生任何相关的日志行。

我相信旧的CSR是使用2048 位生成的,而新的 CSR 是使用4096生成的——这可能是原因吗?

两个公钥都是 2048 位 RSA。

根据diff -u <(openssl x509 -in jenkins.crt.pem.old -text) <(openssl x509 -in jenkins.crt.pem -text)旧证书使用sha256WithRSAEncryption,而新证书使用sha1WithRSAEncryption签名算法。

别名很重要吗?Jenkins 不支持超过 2048 位的密钥吗?Jenkins/OpenJDK/ Amazon Linux是否不适用于某些键?

我还应该检查什么?

ssl
  • 1 个回答
  • 17631 Views
Martin Hope
l0b0
Asked: 2010-03-26 02:14:40 +0800 CST

JavaScript 用户跟踪,无需发送数据

  • 0

为了能够在保护隐私的同时进行详细的用户跟踪(JS 交互,而不仅仅是链接日志),我正在寻找像 Google Analytics 这样的东西,它可以在本地存储所有数据。

logging javascript
  • 1 个回答
  • 263 Views
Martin Hope
l0b0
Asked: 2009-09-08 07:38:45 +0800 CST

避免读取单个文件的密码检查 (Apache + dav_svn)

  • 2

我有一个私有文件的 Subversion 存储库,由 Apache 通过 HTTPS 使用dav_svn 提供服务。我想让单个域中的用户使用 HTTP 从此存储库中读取单个文件。我该如何编写这样的覆盖?当前配置:

<Location /svn>
  DAV svn
  SVNParentPath /var/lib/svn

  AuthzSVNAccessFile /etc/apache2/dav_svn.authz
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd
  Require valid-user
</Location>
apache-2.2
  • 3 个回答
  • 911 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve