[linux上路] 开发环境准备四 Debian8 导入CA证书

2023-05-16

  • 问题说明
  • 操作步骤
    • 安装ca-certificates软件包
    • 确认证书格式
    • 存放证书的路径
    • 修改配置文件
    • 重新更新证书
  • 结语

问题说明

邮件配置成POP3,但是在同步时发生SSL错误,意思是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证书,并妥善整合到系统中,让大多数应用程序能够找到它,我们这样做:

安装ca-certificates软件包

Make sure you have installed the ca-certificates package.确认您的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

确认证书格式

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.确认您要安装的证书文件是PEM格式,后缀名是.crt。例如Root.ca,我实际操作时证书的后缀名是.crt,不知道为什么英文版文档里说例如Root.ca

存放证书的路径

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

修改配置文件

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

重新更新证书

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

$ update-ca-certificates 

结语

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目录下的证书,则需要您在相关程序中去单独导入。

我实际操作的结果是这样配置完毕后Thunderbird就可以使用了。

证书格式转换 http://netkiller.github.io/cryptography/openssl/format.html

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

[linux上路] 开发环境准备四 Debian8 导入CA证书 的相关文章

  • Python3+Selenium框架搭建

    Webdriver概述 Webdriver Selenium2 xff09 是一种用于Web应用程序的自动测试工具 xff0c Thoughtworks公司一个强大的基于浏览器的开源自动化测试工具 xff0c 通常用来编写web应用的自动化
  • 算法题1:字符序列交换(阿里巴巴笔试题)

    题目 xff1a 若初始序列为gbfcdae xff0c 那么至少需要多少次两两交换 xff0c 才能使该序列变为abcdefg xff1f 任给一个自由a g这7个字母组成的排列 xff0c 最坏的情况下需要至少多少次两两交换 xff0c
  • 写给前端的 Nest.js 教程——10分钟上手后端接口开发

    前言 这个教程的所有代码我都放在了我的 GitHub 仓库 xff1a Nest CRUD Demo 1 xff0c 欢迎大家点个 Star xff01 框架简介 Nest 是一个用于构建高效 xff0c 可扩展的 Node js 服务器端
  • NSPredicate谓词搜索使用小记

    iOS中的搜索正常情况下用NSPredicate都足以解决问题 比如我们有一个原数组 dataArraty NSPredicate predicate 61 NSPredicate predicateWithFormat 64 span c
  • extern和volatile的用法

    extern 的用法 extern的用法的对象主要是变量和函数 用extern声明外部变量 什么是外部变量 外部变量是指在文件或者函数外部定义的全局变量 外部变量仅定义一次并且在所有的函数之外 在一个文件内使用外部变量 作用域 xff1a
  • 抽象数据类型定义(ADT)

    一 抽象数据类型定义 xff08 ADT xff09 作用 xff1a 抽象数据类型可以使我们更容易描述现实世界 例 xff1a 用线性表描述学生成绩表 xff0c 用树或图描述遗传关系 定义 xff1a 一个数学模型以及定义在该模型上的一
  • Keil串口仿真调试

    用到的软件 Keil开发软件 虚拟串口软件 串口调试小助手 软件介绍 1 虚拟串口软件 对于笔记本电脑来说 xff0c 没有自带串口使用虚拟串口软件可以模拟真实的串口 程序可以利用虚拟串口与其他串口交换数据 Virtual Serial P
  • Qt学习之路【5】:静态Qt库下SQLite数据库无法加载驱动(QSQLITE driver not loaded)

    使用的Qt库 Qt4 8 6 交叉编译工具链 xff1a arm linux gcc 4 3 6 这个问题纠结了好久 刚开始我使用的是Qt的动态库 xff0c 没有出现这个问题 现在使用的是Qt的静态库出现了这个问题 xff1a QSqlD
  • 【群晖nas】阿里域名DDNS 配置外网访问(华硕AC68U路由端口映射)

    拓扑图 友情提示 xff1a 其实 xff0c 华硕的路由是提供了免费域名的 具体步骤 确保路由器的WAN口IP为公网地址 在 路由器管理 系统设置 界面 xff0c 允许 从互联网设置RT AC88U 步骤1 高级设置 系统管理 系统设置
  • 使用"conn / as sysdba"登录时报出"insufficient privileges"错的问题

    1 xff09 conn as sysdba 的认证方式 oracle数据库的三种登录验证方式 xff1a 操作系统身份认证 密码文件认证 数据库认证 而conn as sysdba是属于操作系统认证 原理 xff1a 电脑开机时登录的用户
  • 数码管消影问题总结

    1 消影方法1 先送段选数据后送位选数据时 xff0c 需要在中间加入一条语句P0 61 0xff 作用是消影 现在来分析一下是怎样 产生影的 xff1f 当dula 61 0后锁住了P0口的数据 xff0c 即P0口仍然保持着上次的段选数
  • 【linux学习】ubuntu下挂载window共享文件

    ubuntu下挂载window共享文件实现文件共享 第一步 xff1a 将要共享的window文件夹共享 第二步 在ubuntu下进行挂载 xff0c 完整语法 xff0c 如下 xff1a 第一种方式 mount t cifs 192 1
  • ROM、SDRAM、RAM、DRAM、SRAM、FLASH 的区别

    ROM 和 RAM 指的都是半导体存储器 xff0c ROM 是 Read Only Memory 的缩写 xff0c RAM是 Random Access Memory的缩写 ROM 在系统体质供电的时候仍然可以保存数据 xff0c 而R
  • 软件开发技术文档编写规范

    在项目开发过程中 xff0c 应该按要求编写好十三种文档 xff0c 文档编制要求具有针对性 精确性 清晰性 完整性 灵活性 可追溯性 可行性分析报告 xff1a 说明该软件开发项目的实现在技术上 经济上和社会因素上的可行性 xff0c 评
  • insmod: can't insert 'led.ko': invalid module format详细解释

    insmod can 39 t insert 39 led ko 39 invalid module format 之前在Imx257学习版固件编写的驱动想直接移植imx257核心板的开发板上 以为2个板子的源码的引脚定义一样就没什么问题了
  • html媒体查询,同一个网页,在不同的条件下,使用不同的样式。

    媒体查询简述 设备 xff1a 屏幕 xff1a PC 手机端打印机屏幕阅读器 尺寸 xff1a 常见尺寸 320 420之间 响应式网页 xff1a 同一个网页 xff0c 在不同的条件下 xff0c 使用不同的样式 rem 百分比 xf
  • Anaconda3的安装和详细介绍(带图文)

    Anaconda的安装和详细介绍 xff08 带图文 xff09 Anacond的介绍 Anaconda指的是一个开源的Python发行版本 xff0c 其包含了conda Python等180多个科学包及其依赖项 因为包含了大量的科学包
  • vue项目引入less文件

    如果需要在vue项目中使用 less文件 xff0c 首先需要安装less和less loader依赖包 xff0c 这个 less文件相当于以前web项目的css文件 xff0c 有三种引入方式 xff1a 方式一 xff1a 在vue界
  • 新的开始

    这是第一次写博客 xff0c 也算是一个新的开始 今天就是写一些自己学到的内容 xff1a 今天接触了冒泡排序法 xff0c 还是能够接受的 1 init function var a 61 10 30 20 40 15 5 25 var
  • 【群晖nas】raidrive 极简教程

    1 群晖套件重心下载并配置 webDav server 2 raidrive连接群晖 xff0c 本地化使用 网盘下载 链接 xff1a https pan baidu com s 1eP9zBjlPjmL2 0MlWUlS3A 提取码 x

随机推荐