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-236478

eftshift0's questions

Martin Hope
eftshift0
Asked: 2025-02-27 02:02:24 +0800 CST

openssl - 使用中间 CA 的问题

  • 8

我正在尝试了解如何使用中间 CA 证书来唱歌。我已经开发了一个相当简单的示例(使用https://gist.github.com/jadbaz/9350f4df4e4ef4c5d256889aa3d5a5ed作为基础,尽管我删除了配置文件并相应地调整了一些命令)...我希望最终证书可以使用我在执行期间创建的 2 个 CA 中的任何一个进行验证,但验证失败....我遗漏了什么:

# root ca
openssl genrsa -out rootca.key 4096
openssl req -sha256 -new -x509 -days 3650 -key rootca.key -out rootca.crt -subj /CN=rootca

# intermediate ca
openssl genrsa -out interca1.key 4096
openssl req -sha256 -new -key interca1.key -out interca1.csr -subj /CN=intermediateca -addext "basicConstraints=critical,CA:true" -addext "keyUsage=critical,keyCertSign,cRLSign"
openssl x509 -copy_extensions copyall -req -days 365 -in interca1.csr -CA rootca.crt -CAkey rootca.key -CAcreateserial -out interca1.crt

# verify chain so far
openssl verify -CAfile rootca.crt rootca.crt interca1.crt # both certificates are ok

# generating an example certificate
openssl genrsa -out example1.key 2048
openssl req -new -sha256 -key example1.key -out example1.csr -subj /CN=example1
openssl x509 -copy_extensions copyall -req -days 365 -in example1.csr -CA interca1.crt -CAkey interca1.key -CAcreateserial -out example1.crt

# verify results
openssl verify -CAfile rootca.crt rootca.crt interca1.crt example1.crt
openssl verify -CAfile interca1.crt interca1.crt example1.crt

这是最后一次验证运行的输出:

# openssl verify -CAfile rootca.crt rootca.crt interca1.crt example1.crt
rootca.crt: OK
interca1.crt: OK
CN=example1
error 20 at 0 depth lookup: unable to get local issuer certificate
error example1.crt: verification failed
# openssl verify -CAfile interca1.crt interca1.crt example1.crt
CN=intermediateca
error 20 at 0 depth lookup: unable to get local issuer certificate
error interca1.crt: verification failed
CN=intermediateca
error 2 at 1 depth lookup: unable to get issuer certificate
error example1.crt: verification failed

我错过了什么?

而且,为什么不能用interca1同样的方式验证自己rootca呢?

我正在使用 openssl 3.2.2。

更新

在接受的答案中没有对此进行解释,但让我添加一个命令,如果您想尝试的话,该命令应该可以工作:

$ openssl verify -CAfile <( cat rootca.crt interca1.crt ) rootca.crt interca1.crt example1.crt
rootca.crt: OK
interca1.crt: OK
example1.crt: OK
openssl
  • 1 个回答
  • 125 Views
Martin Hope
eftshift0
Asked: 2025-02-26 16:29:04 +0800 CST

openssl - 是否可以使用 openssl 3.2 生成 V1 x.509 ca 证书?

  • 6

在 openssl 3.0.7 中,我可以在 openssl-ca 手册页中看到这一点:

       -extensions section
           The section of the configuration file containing certificate extensions to be added when a certificate is issued (defaults to x509_extensions unless the
           -extfile option is used).  If no X.509 extensions are specified then a V1 certificate is created, else a V3 certificate is created.  See the
           x509v3_config(5) manual page for details of the extension section format.

但是在 openssl 3.2.2 中,它没有提及 V1:

       -extensions section
           The section of the configuration file containing certificate extensions to be added when a certificate is issued (defaults to x509_extensions unless the
           -extfile option is used).

           See the x509v3_config(5) manual page for details of the extension section format.

是否不再可能生成使用 V1 的证书?

openssl
  • 1 个回答
  • 25 Views
Martin Hope
eftshift0
Asked: 2024-06-12 01:03:07 +0800 CST

在 rocky linux 中启用/安装软件包的标准方法是什么?

  • 5

我想为我的一个项目的 rockylinux 构建一个包:

https://github.com/eantoranz/gitmod

我能够为 ubuntu、debian 和 fedora 创建软件包,没有太多问题……只需安装软件包(包括开发软件包),构建即可。目前结果:

https://github.com/eantoranz/gitmod/releases/tag/v0.11

但我对 rockylinux 没有提供很多开箱即用的功能感到困惑(使用 rockylinux:9 docker 镜像):

# dnf search libgit2 fuse3 glib2 cunit
No matches found.

我应该启用哪些存储库来查看与这些搜索词相关的包?

rpm
  • 1 个回答
  • 25 Views
Martin Hope
eftshift0
Asked: 2024-06-03 00:14:11 +0800 CST

创建 deb 包 - 是否有标准方法来为最终的 deb 包设置后缀?

  • 5

我正在学习如何为我的一个小项目创建 deb 包。我已经能够为二进制文件创建 deb 包。到目前为止一切顺利。该过程完成后,我可以看到以下内容:

$ dpkg -c gitmod_0.10-1_amd64.deb
drwxr-xr-x root/root         0 2024-06-01 13:57 ./
drwxr-xr-x root/root         0 2024-06-01 13:57 ./usr/
drwxr-xr-x root/root         0 2024-06-01 13:57 ./usr/bin/
-rwxr-xr-x root/root     31400 2024-06-01 13:57 ./usr/bin/gitmod
drwxr-xr-x root/root         0 2024-06-01 13:57 ./usr/share/
drwxr-xr-x root/root         0 2024-06-01 13:57 ./usr/share/doc/
drwxr-xr-x root/root         0 2024-06-01 13:57 ./usr/share/doc/gitmod/
-rw-r--r-- root/root       154 2024-06-01 13:57 ./usr/share/doc/gitmod/changelog.Debian.gz
-rw-r--r-- root/root        45 2024-06-01 13:57 ./usr/share/doc/gitmod/copyright

我希望能够为不同版本的 debian(甚至其他发行版)生成软件包,因此我希望能够拥有如下软件包:

gitmod_0.10-1_bullseye_amd64.deb
gitmod_0.10-1_bookworm_amd64.deb

因此,我需要能够以参数化的方式提供后缀(即使我需要使用模板文件来生成用于debuild生成包的文件)。

是否有可能以标准方式实现这一目标?

debian
  • 1 个回答
  • 20 Views
Martin Hope
eftshift0
Asked: 2023-12-12 18:03:12 +0800 CST

rsync - 在尝试写入(本地)之前是否运行读取/读取/比较?

  • 5

我的理解rsync(可能是完全错误的)是,它会首先尝试读取文件(源文件和目标文件,如果存在)以进行比较,然后再尝试在目标文件上写入内容(我预计这会比读取文件慢) )。我正在运行 rsync 来同步我的主目录的备份,而不是在源磁盘和目标磁盘上看到大量读取(在执行之前的 rsync 运行之后),而是在目标磁盘上看到大量写入,这是我没想到。rsync 总是这样工作吗?

我使用它的方式,以防万一:

rsync --delete -r /home/my-home /mount-point-other-disk/
rsync
  • 1 个回答
  • 30 Views
Martin Hope
eftshift0
Asked: 2021-10-28 14:28:18 +0800 CST

cron 对使用非偶数分隔符的范围有何反应?

  • 0

假设我们想每 20 分钟运行一次任务:

0/20 * * * *

它将在,X:00等处运行。X:20X:40

每 15 次?

0/15 * * * *

所以它会在X:00,X:15和X:30处运行X:45。

但是如果我们想每45分钟运行一次会发生什么?

0/45 * * * *

我倾向于认为它会运行在X:00,然后在X:45,然后在X+1:00(顺便说一句,这不是我需要的)?或者它会运行X+1:30(正是我需要的)?

Cronjob schedule解释说它总是将运行分开 45 分钟,但问题与每小时运行 X 分钟有关,所以他们的正确答案并不真正适用于我的情况,我想确定答案。

cron
  • 1 个回答
  • 19 Views

Sidebar

Stats

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

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve