【问题标题】:Jenkins execution with node and dwupload module return Error: ca key too smallJenkins 使用节点和 dwupload 模块执行返回错误:ca key too small
【发布时间】:2021-05-14 10:01:47
【问题描述】:

我们在 docker-compose 中使用 Jenkins (2.235.2) 和 BlueOcean 以及来自 jenkinsci/jnlp-slave:latest 的奴隶。
因此,当我需要使用 node(10.15.3)dwupload(3.8.2) 在 Salesforce 沙盒中交付具有两个工厂身份验证的墨盒时,我们会收到以下错误:

# command
dwupload --hostname cert.staging.(...).demandware.net --username **** --password **** --cartridge cartridges/lib_productlist --code-version hav_12 --p12 **** --passphrase ****
# error logs
{ 'file-upload': false, 'cartridge-upload': false, 'directory-create': false, 'file-delete': false } [15:28:53] Error: ca key too small

请你帮帮我。

【问题讨论】:

  • 我在 Jenkins 管道中遇到了完全相同的问题。你有没有运气解决它?

标签: node.js jenkins salesforce node-modules


【解决方案1】:

在这种情况下,OpenSSL 是罪魁祸首,因为不太新的安装需要更长的密钥长度,所以有两种方法可以解决这个问题:

  • “旧的快速而肮脏的方式”:降低它:
sudo cp /etc/ssl/openssl.cnf{,.backup}
sudo sed -i 's/SECLEVEL=2/SECLEVEL=1/g' /etc/ssl/openssl.cnf

你可以走了。如果你使用 Docker 镜像运行 Jenkins,你将不得不更新它们。这种方法的问题在于它是系统范围的。

  • 您可以通过在 Jenkins 管道中创建备用 OpenSSL 配置文件来仅为 dwupload 更改它。像这样:
sh "sed 's/SECLEVEL=2/SECLEVEL=1/g' /etc/ssl/openssl.cnf > openssl_custom.cnf"
sh "OPENSSL_CONF=openssl_custom.cnf dwupload --hostname ${hostname} --username ${username} ..."
sh "rm -rf openssl_custom.cnf"

阿布拉索斯!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-23
    • 2019-11-09
    • 2019-05-28
    • 1970-01-01
    相关资源
    最近更新 更多