pkg set-publisher:一个或多个客户端密钥和证书文件已过期

pkg set-publisher:一个或多个客户端密钥和证书文件已过期

我有一个较旧的 Solaris 11.3 机器。盒子上有我的旧钥匙和证书,但它们已过期。它导致 pkg 更新失败:

pkg update: One or more client key and certificate files have expired. Please
update the configuration for the publishers or origins listed below:

Publisher: solarisstudio
  Origin URI:
    https://pkg.oracle.com/solarisstudio/release/
  Certificate:
    /var/pkg/ssl/58e4e6a85dc87a50e56563042baedfba0d3622fc
  Key:
    /var/pkg/ssl/f348576808455b0fc8cda24323f97c79e1d96a9c

我有新的密钥和证书,我正在尝试安装它们。我重新运行命令来安装密钥和证书:

$ sudo pkg set-publisher \
   -k ~/pkg.oracle.com.key.pem \
   -c ~/pkg.oracle.com.certificate.pem \
   -G "*" -g https://pkg.oracle.com/solarisstudio/release solarisstudio

pkg set-publisher: One or more client key and certificate files have expired. Please
update the configuration for the publishers or origins listed below:

Publisher: solarisstudio
  Origin URI:
    https://pkg.oracle.com/solarisstudio/release/
  Certificate:
    /export/home/jwalton/pkg.oracle.com.certificate.pem
  Key:
    /export/home/jwalton/pkg.oracle.com.key.pem

这一定是甲骨文开的某种不正当的玩笑。我试图给它未过期的密钥和证书,但由于过期的密钥和证书而拒绝它们。叹...

这是 Oracle 的页面包安装和更新故障排除,但它无法提供更新密钥和证书的说明。 (再说一次,我一定是这个星球上唯一有这个问题的人)。

我尝试手动删除原点,-G但问题仍然存在:

$ pkg set-publisher -G https://pkg.oracle.com/solarisstudio/release/
pkg set-publisher: requires a publisher name
Usage:
        pkg set-publisher [-Ped] [-k ssl_key] [-c ssl_cert]
            [-g origin_to_add|--add-origin=origin_to_add ...]
            [-G origin_to_remove|--remove-origin=origin_to_remove ...]
            [-m mirror_to_add|--add-mirror=mirror_to_add ...]
            [-M mirror_to_remove|--remove-mirror=mirror_to_remove ...]
            [-p repo_uri] [--enable] [--disable] [--no-refresh]
            [--reset-uuid] [--non-sticky] [--sticky]
            [--search-after=publisher]
            [--search-before=publisher]
            [--search-first]
            [--approve-ca-cert=path_to_CA]
            [--revoke-ca-cert=hash_of_CA_to_revoke]
            [--unset-ca-cert=hash_of_CA_to_unset]
            [--set-property name_of_property=value]
            [--add-property-value name_of_property=value_to_add]
            [--remove-property-value name_of_property=value_to_remove]
            [--unset-property name_of_property_to_delete]
            [--proxy proxy to use]
            [publisher]

并就地更新属性:

$ sudo pkg set-publisher \
    --add-property-value key=~/pkg.oracle.com.key.pem solarisstudio \
    --add-property-value certificate=~/certificate=~/pkg.oracle.com.certificate.pem \
    solarisstudio

pkg set-publisher: One or more client key and certificate files have expired. Please ...

和:

$ sudo pkg set-publisher --set-property key=~/pkg.oracle.com.key.pem solarisstudio \
    --set-property certificate=~/pkg.oracle.com.certificate.pem solarisstudio
pkg set-publisher: only one publisher name may be specified ...

如何更新密钥和证书?

答案1

很高兴密钥/证书对可以在另一个系统上工作。

要删除现有发布者:

  pkg unset-publisher solarisstudio

或发布者的特定来源:

  pkg set-publisher -G https://pkg.oracle.com/solarisstudio/release solarisstudio

但无论如何,可以通过以下方式检查证书:

  openssl x509 -in path_to_certificate_file -text

因此,请查看输出并查看日期是否正确(通过确保输出是以下内容来验证“旧”系统上的证书文件与“新”系统上的证书文件是否相同可能很有趣相同的)。

相关内容