linux系统导入CA证书

2023-05-16

英文版出处:http://majic.rs/blog/system-wide-installation-of-certificates

因为众所周知的原因,同步android源码成了非常痛苦的事情。迫不得已采用了goagent,但是在同步时发生经常发生SSL错误,意思是CA认证失败。网上找了一圈资料,最后明白根本的原因是系统中没有安装goagent的CA证书。这里的系统不是指firefox,也不是Chrouium。于是找到了上面这篇文章。来个对照翻译吧,水平有限,错误或生硬的地方请留言,我更正。

A lot of tutorials and how-to guides can be found on the Internet regarding the creation of self-signed certificates, or even of your own certificate authority. While the tutorials are usually very good and pretty straightforward, for some reason they seem to leave out the instructions for actually deploying the CA certificates.
您可以在互联网上找到许多的教程和操作指南,教您如何创建自签名证书,甚至创建你自己的证书颁发机构。这些教程非常简单易懂,但是不知出于什么原因,它们都没有说明如何在真实系统上实际部署CA证书。

Although not all applications under GNU/Linux distributions respect this, the applications very often utilise the certificates located within the /etc/ssl/certs directory. The certificates themselves are usually installed through the ca-certificates package. In order to install the custom CA certificate and integrate it properly into the system so that most applications will be able to find it, several steps should be performed.

虽然不是所有的GNU/ Linux发行版都遵循这一点,但通常linux发行版都从/ etc / ssl下/ certs目录中读取证书。系统自带的证书通常是通过ca-certificates软件包安装的。为了安装自定义的CA证书,并妥善整合到系统中,让大多数应用程序能够找到它,您需要执行以下几个步骤:

1. Make sure you have installed the ca-certificates package.

1.确认您的linux系统已经安装了ca-certificates软件包

Under Debian the package can be installed by issuing the following command:

类Debain系统(凡是使用apt包管理系统的发行版,如Ubuntu、linuxmint等)可以采用如下命令安装:

$ apt-get install ca-certificates

Under Gentoo the package can be installed by issuing the following command:

Gentoo系统可以采用如下命令安装:

$ emerge -v ca-certificates

Under Fedora the package can be installed by issuing the following command:

Fedora系统可以采用如下命令安装:

$ yum install ca-certificates

2. Make sure you have certificates in PEM format, with the .crt extension. For the purpose of this example the certificate file will be named Example Root.ca

2.确认您要安装的证书文件是PEM格式,后缀名是.crt。例如Root.ca

3. Create a subdirectory within the /usr/share/ca-certificates/ directory. For the purpose of this example the directory will be named example.com. Place the certificate authority certificate into this subdirectory.

3.建议在 /usr/share/ca-certificates/ 目录下创建单独的目录来保存您的CA证书文件。例如/usr/share/ca-certificates/example.com/Example Root.ca

4. Append a new line listing the relative path (to the /usr/share/ca-certificates/ directory) to the certificate you just copied to the file /etc/ca-certificates.conf. For the purpose of this example the line will be:

4.在 /etc/ca-certificates.conf文件中添加一行:您的证书文件去除 /usr/share/ca-certificates/ 目录后的相对路径。例如针对上面的例子,就只需要添加
example.com/Example Root.ca

5. Finally, run the update-ca-certificates command as root in order to have it regenerate the /etc/ssl/certs directory to reflect the new changes.

5.最后,用root权限运行update-ca-certificates 命令,它会重新收集证书并更新 /etc/ssl/certs/ca-certificates.crt文件

After these steps many utilities (like wget, for example) will be able to properly utilise the newly-installed certificate. Keep in mind that some applications do not use the certificates located withing the /etc/ssl/certs/ directory (like Firefox, or Thunderbird), and in these cases you'll have to import the certificate manually into each one of them.
至此,绝大多数程序就能访问您的新证书了。少数程序如Firefox、Thunderbird等不读取/etc/ssl/certs目录下的证书,则需要您在相关程序中去单独导入。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

linux系统导入CA证书 的相关文章

  • 将Word 2010的公式转换成MathType公式

    现在越来越多的人在文档中编辑公式的时候会选择MathType来编辑 xff0c 因为它包含有众多的数学符号和模板 xff0c 编辑公式时非常方便 但是也有一些人在编辑公式时没有使用MathType公式编辑器 xff0c 直接使用Word中自
  • Paraview与VTK学习笔记(五)

    上一节最后执行到 xff1a this gt GetRenderWindow gt Render 也就是执行到了vtkRenderWindow Render 了 xff0c 我们可以看到这个函数是告诉这个RenderWindow下的每一个r
  • cf1214A A. Optimal Currency Exchange

    A Optimal Currency Exchange time limit per test1 5 seconds memory limit per test512 megabytes inputstandard input output
  • HTTP 413 Request Entity Too Large(Payload Too Large)

    原因 上传文件时 xff0c 请求参数过大 xff0c 导致超出服务端限制 客户端发送的实体主体部分比服务器能够或者希望处理的要大 解决 Nginx默认最大能够上传1MB文件 xff0c 打开nginx conf在http 中 xff0c
  • 常见服务默认端口

    服务端口FTP xff08 File Transfer Protocol xff0c 文件传输协议 xff09 21端口SSH xff08 Secure Shell Protocol xff0c 安全外壳协议 xff09 22端口Telne
  • linux环境下交叉编译arm架构jpeglib

    1 官网下载jpeglib源码 下载地址 http www ijg org 选择目前最新的版本jpegsrc v9c tar gz 2 配置 configure prefix span class token operator 61 spa
  • python批处理将图片进行放大实例代码

    最近处理一些规格不一的照片 xff0c 需要修改成指定尺寸便于打印 xff0c 本篇文章主要给大伙介绍关于Python批量处理将图片进行放大的相关资料 xff0c 文中通过实例代码介绍的非常详细 xff0c 需要的伙伴们可以参考下 pyth
  • 一些必不可少的Sublime Text 2插件

    中文原文 xff1a 一些必不可少的sublime text 2插件 整理自 xff1a Essential Sublime Text 2 Plugins and Extensions 请尊重版权 xff0c 转载请注明来源 xff0c 多
  • linux系统安装Confluence

    1 使用docker安装Confluence容器 docker run d name confluence p 8090 8090 user root root cptactionhank atlassian confluence late
  • Ubuntu 20.04 安装STM32开发环境 (Ubuntu+STM32CubeMX + Vscode+Makefile+Openocd)

    小记 xff1a 最近在学习I MX6U和Zynq比较多 xff0c 又都是在linux系统下 xff0c 然后又不想丢下STM32单片机 xff0c 所以就想到了可不可以在Ubuntu操作系统中编写STM32的代码 xff0c 来替代Wi
  • rust 介绍及开发环境配置(linux+windows)

    本文以windows或linux桌面作为开发环境 注意 xff1a rust需要c的编译器 rustup是官方的 xff0c 会安装cargo包管理 xff0c 这个cargo通常会伴随rust开发的全过程 一 介绍 官网链接 xff1a
  • 打开.data文件的步骤

    老师最近给了一组 data格式的文件 xff0c 当我直接强行改为 csv或者 xls文件再使用Python打开 xff0c 发现数据在Python中只有一列 xff0c 后面无法对数据进行索引 xff0c 在搜了一些方法后 xff0c 分
  • Week2 实验 A - 化学 Gym - 270437A

    题目 甄别烷烃基的类别 假设如上图 xff0c 这个烷烃基有6个原子和5个化学键 xff0c 6个原子分别标号1 6 xff0c 然后用一对数字 a b 表示原子a和原子b间有一个化学键 这样通过5行a b可以描述一个烷烃基 输入第一行为数
  • cf1214B B. Badges

    B Badges time limit per test1 second memory limit per test512 megabytes inputstandard input outputstandard output There
  • OpenWrt无线桥接同网段主路由的方法

    OpenWrt无线桥接同网段主路由的方法 注 xff1a 有些版本的openwrt需要将DNS转发关闭 xff0c 否则无法上网
  • mybatis-sql语句莫名其妙被加上limit分页条件或未执行查询条件

    1 背景 在优化代码 xff0c 查询sql执行情况时 xff0c 突然发现写的查询条件突然发现被加了limit参数 以为遇到了bug xff0c 查了半天 结果是同事在另一业务代码里查询时用了开启了分页 xff0c 但后面业务其实没用到
  • 2020-11-03

    ios工作层设备 一层 xff08 物理层 xff09 xff1a 网卡 集线器 中继器 二层 xff08 数据链路层 xff09 xff1a 网桥 交换机 xff08 暴露真实mac地址 xff09 三层 xff08 网络层 xff09
  • 2020-12-08

    代码简介 xff1a python读取excel数据 xff0c 并汇总结果 xff0c 统计厂商个数 xff0c 每个厂商的版本个数 xff0c 提测型号种类 xff0c 厂商总的测试通过率 import xlrd import open
  • vue echart入门柱状图

    不知道为啥script只能这样引入才显示图片 span style background color f3f4f5 color 000000 import as echarts from 39 echarts 39 span lt temp
  • Brup盲注,测sql注入

    第一步 xff0c 先拦截接口 xff0c 发送到intrude 第二步 xff1a 对需要注入的参数值添加 第三步 xff1a 加载脚本文件 第三步 xff1a 攻击后 xff0c 查看是否有注入成功的脚本 备注 xff1a sql注入脚

随机推荐

  • vue处理后端的数据

    方法一 xff1a 如果后端是已类的方式传递给前端数据 xff0c 直接res data读取参数 方法二 xff1a vue请求后端返回的数据res object object 使用JSON stringify xff08 xff09 和J
  • 调用带有签名的API接口,字符串转化成JSONObject 处理返回的结果

    一 调用带有签名的API接口 xff08 sign已加密 xff09 String Url 61 34 http xxx 2000 dcs xxxxx 34 43 34 param1 61 34 43 param1 43 34 amp no
  • SIPP压测环境安装部署,以及脚本编写

    1 首先去官网下载sipp的tar包 xff0c 然后把sipp 3 4 1 tar gz上传到liunx下自建的目录或者home目录 xff08 rz 上传sz 下载 xff09 2 将sipp 3 4 1 tar gz进行解压 xff0
  • vue父组件与子组件通信

    在父组件上弹出子组件 父组价代码 lt template gt lt div gt lt div class 61 39 container 39 gt lt el button type 61 39 primary 39 icon 61
  • cf1214C C. Bad Sequence

    C Bad Sequence time limit per test1 second memory limit per test512 megabytes inputstandard input outputstandard output
  • Windows10安装Golang环境

    Windows10安装Golang环境 下载 https go dev dl 一般选择zip压缩版 xff0c 例如 xff1a go1 20 2 windows amd64 zip 配置 编辑系统变量PATH xff0c 加入解压目录下的
  • 安全测试--crlf

    知其然要知其所以然 CRLF是 回车 43 换行 xff08 r n xff09 的意思 在HTTP协议中 xff0c HTTP Header与HTTP Body是用两个CRLF分隔的 xff0c 浏览器就是根据这两个CRLF来取出HTTP
  • vue 前端下载excel的n中方法

    1 直接下载html中的表格元素 lt table id 61 34 table 34 border 61 34 1 34 gt lt tr style 61 34 height 50px 34 gt lt th style 61 34 w
  • 自动化测试平台搭建之路

    自动化测试所涉及的软件及安装包 xff08 64位系统 xff09 python 2 7 测试需要的语言 xff08 python2 7以上自带pip 包管理工具 xff09 wxPython2 8 unicode Python语言的一套优
  • 接口测试

    目前正在做接口测试 xff0c 被人博客中看到的 xff0c 总结的不错 xff0c 复制粘贴来的 xff0c 选择性借鉴 一 什么是接口测试 接口测试 xff1a 测试系统组件间接口的一种测试 主要用于检测外部系统与系统之间以及系统内部各
  • 阿里笔试_ //如果有人n分钟内,连续发帖M次,将本人封杀掉

    如果有人n分钟内 xff0c 连续发帖M次 xff0c 将本人封杀掉 算法思想 xff1a Arrylist存储点击的记录 HashMap xff08 用户 xff0c 发帖时间 xff0c 次数 xff09 HashSet xff08 封
  • 基于RF的web自动化测试

    前提 xff1a 安装python 配置好自动化测试的框架RobotFrame框架 1 web的自动化测试基于库Selenium2Library 而此库又依赖这4个关联的库 xff1a decorator xff0c selenium ro
  • 接口和抽象类

    收藏的别人的 xff0c 总结的清晰易懂 一 抽象类 1 抽象类 包含一个抽象方法的类就是抽象类 2 抽象方法 声明而未被实现的方法 xff0c 抽象方法必须使用abstract关键词字声明 1 2 3 4 5 6 public abstr
  • jmeter请求ipv6

    ipv6改造 1 在nginx服务器上重新配置nginx conf文件 xff08 配置信息如下 xff09 2 nginx服务上 xff0c ping 查看 ipv6的地址 3 在nginx服务器上能 ping6 xxxx xxx 0 x
  • jmeter 数据库压测

    第一步 xff1a 第二步 xff1a 下图若选择永远 xff0c 1分钟内达到最大并发量40 xff0c 立即循环执行 xff0c 持续执行5min 第三步 xff1a 第四步 xff1a 这里的Mysql需要和下图中的一致 测试结果 x
  • 压测服务器的搭建及测试执行

    一个项目可能存在多个环境 开发的调试环境 xff0c 测试人员的测试环境 xff0c 专门压测的压测环境 一般测试环境和压测环境由测试人员维护 xff0c 因为考虑压力测试设计到高并发 xff0c 高性能 xff0c 在不知代码质量的情况下
  • c语言学生宿舍管理系统( 文件(二进制文本存储),链表版)

    实现简单的学生宿舍基本信息管理 xff0c 宿舍的基本信息包括楼号 房间号 面积 所容纳人数 已入住人数等 xff0c 系统以文本菜单形式工作 登录时 xff1a 用户名为asd 密码任意 include lt stdio h gt inc
  • mock工程的编写和应用

    mock方法体的编写 xff1a 首先明确自己要mock的方法 xff0c 需要传入的参数和需要返回的参数 xff0c 然后明确路径 xff0c 一 xff1a 如下图解 xff0c 我们需要mock一个 传入json对象和传出json对象
  • Linux使用hdparm检测硬盘信息

    一 安装hdparm centos sudo yum install hdparm ubuntu 银河麒麟 sudo apt get install hdparm 二 使用 查看硬盘的读取速度及缓存速度速度 hdparm tT dev sd
  • linux系统导入CA证书

    英文版出处 xff1a http majic rs blog system wide installation of certificates 因为众所周知的原因 xff0c 同步android源码成了非常痛苦的事情 迫不得已采用了goag