• 周一. 5月 27th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

openssl源码介绍

admin

11月 28, 2021

一、crypto目录

openssl 源代码主要由 eay 库、ssl 库、工具源码、范例源码以及测试源码组成。eay 库是基础的库函数,提供了很多功能。源代码放在 crypto 目录下。包括如下内
容:
1) asn.1 DER 编码解码(crypto/asn1 目录),它包含了基本 asn1 对象的编解码以及数字证书请求、数字证书、CRL 撤销列表以及 PKCS8 等最基本的编解码函数。这些函数主要通过宏来实现。
2) 抽象 IO(BIO,crypto/bio 目录),本目录下的函数对各种输入输出进行抽象,包括文件、内存、标准输入输出、socket 和 SSL 协议等。
3) 大数运算(crypto/bn 目录),本目录下的文件实现了各种大数运算。这些大数运算主要用于非对称算法中密钥生成以及各种加解密操作。另外还为用户提供了大量辅助函数,比如内存与大数之间的相互转换。
4) 字符缓存操作(crypto/buffer 目录)。
5) 配置文件读取(crypto/conf 目录),openssl 主要的配置文件为 openssl.cnf。本目录下的函数实现了对这种格式配置文件的读取操作。
6) DSO(动态共享对象,crypto/dso 目录),本目录下的文件主要抽象了各种平台的动态库加载函数,为用户提供统一接口。
7) 硬件引擎(crypto/engine 目录),硬件引擎接口。用户如果要写自己的硬件引擎,必须实现它所规定的接口。
8) 错误处理(crypto/err 目录),当程序出现错误时,openssl 能以堆栈的形式显示各个错误。本目录下只有基本的错误处理接口,具体的的错误信息由各个模块提供。各个模块专门用于错误处理的文件一般为*_err..c 文件。
9) 对称算法、非对称算法及摘要算法封装(crypto/evp 目录)。
10)HMAC(crypto/hmac 目录),实现了基于对称算法的 MAC。
11)hash 表(crypto/lhash 目录),实现了散列表数据结构。openssl 中很多数据结构都是以散列表来存放的。比如配置信息、ssl session 和 asn.1 对象信息等。
12)数字证书在线认证(crypto/ocsp 目录),实现了 ocsp 协议的编解码以及证书有效性计算等功能。
13)PEM 文件格式处理(crypto/pem),用于生成和读取各种 PEM 格式文件,包括各种密钥、数字证书请求、数字证书、PKCS7 消息和 PKCS8 消息等。
14)pkcs7 消息语法(crypto/pkcs7 目录),主要实现了构造和解析 PKCS7 消息;
15)pkcs12 个人证书格式(crypto/pckcs12 目录),主要实现了 pkcs12 证书的构造和解析。
16)队列(crypto/pqueue 目录),实现了队列数据结构,主要用于 DTLS。
17)随机数(crypto/rand 目录),实现了伪随机数生成,支持用户自定义随机数生成。
18)堆栈(crypto/stack 目录),实现了堆栈数据结构。
19)线程支持(crypto/threads),openssl 支持多线程,但是用户必须实现相关接口。
20)文本数据库(crypto/txt_db 目录)。
21)x509 数字证书(crypto/x509 目录和 crypto/x509v3),包括数字证书申请、数字证书和 CRL 的构造、解析和签名验证等功能了;
22)对称算法(crypto/aes、crypto/bf、crypto/cast、ccrypto/omp 和 crypto/des 等目录)。
23)非对称算法(crypto/dh、crypto/dsa、crypto/ec 和 crypto/ecdh)。
24)摘要算法(crypto/md2、crypto/md4、crypto/md5 和 crypto/sha)以及密钥交换/认证算法(crypto/dh 和 crypto/krb5)。
 
ssl 库所有源代码在 ssl 目录下,包括了 sslv2、sslv3、tlsv1 和 DTLS 的源代码。各个版本基本上都有客户端源码(*_clnt.c)、服务源码(*_srvr.c)、通用源码(*_both.c)、底层包源码(*_pkt.c)、方法源码(*_meth.c)以及协议相关的各种密钥计算源码(*_enc.c)等,都很有规律。

二、apps目录

所以openssl命令,都是根据这个目录下的代码编译生成的,通过对openssl各种基础库的调用,实现了openssl的各种命令。

《openssl源码介绍》有26个想法
  1. I appreciate the effort that goes into creating high-quality content, and this post was no exception. The insights and information were top-notch and made for a really engaging read. Keep up the great work!

  2. Your posts always make me feel like I’m not alone in my struggles and insecurities Thank you for sharing your own experiences and making me feel understood

  3. Sumatra Slim Belly Tonic takes pride in its manufacturing process, ensuring that every batch is produced in FDA-approved and GMP-certified facilities. This means that each and every bottle of Sumatra Slim Belly Tonic meets the highest standards of quality and safety. You can trust that you are getting a product that has undergone strict quality control measures and is backed by scientific research.

  4. Sumatra Slim Belly Tonic takes pride in its manufacturing process, ensuring that every batch is produced in FDA-approved and GMP-certified facilities. This means that each and every bottle of Sumatra Slim Belly Tonic meets the highest standards of quality and safety. You can trust that you are getting a product that has undergone strict quality control measures and is backed by scientific research.

  5. Prostadine helps clear out inflammation in the prostate.Prostadine claims the root cause of most prostate issues is due to the accumulation of toxic mineral buildup due to hard water. When unchecked, this toxic buildup leads to inflammation in the prostate and the rest of your urinary tract. This impairs your ability to urinate, ejaculate, and produce hormones needed for your overall health.

  6. Glucotrust is a revolutionary nutritional supplement that is designed to support healthy blood sugar levels in the body. It is made from a blend of essential nutrients and powerful antioxidants that work together to promote optimal health and wellness.

  7. Sugar Defender introduces a meticulously curated ensemble of eight key ingredients, each strategically selected to champion healthy blood sugar levels and facilitate weight loss. These ingredients collaborate to enhance the supplement’s effectiveness through diverse mechanisms, including energy elevation, fat burning, and metabolism stimulation, all while providing direct support for maintaining healthy blood glucose levels. Here is an insightful overview of each ingredient along with its purported functionality according to the manufacturer:

  8. I am blown away by the depth and detail in your posts Keep up the excellent work and thank you for sharing your knowledge with us

  9. Alpilean, a remarkable natural weight loss supplement, harnesses the power of exceptional components sourced from the pristine Alps. These potent substances work synergistically to invigorate your metabolism, incinerate fat, and foster cardiovascular well-being. Remarkably, Alpilean aids in appetite control, effectively curbing cravings for unhealthy foods, thereby facilitating a wholesome and sustainable weight loss journey. Rest assured, the formula is free from any potentially harmful chemicals or additives, having undergone rigorous safety testing. Its unparalleled blend of nutrients renders it an advantageous choice for individuals aspiring to shed weight while elevating their overall health and well-being.

  10. Red Boost is a powerful and effective supplement that is designed to support overall health and well-being, particularly in men who may be experiencing the signs of low testosterone. One of the key factors that sets Red Boost apart from other supplements is its high-quality and rare ingredients, which are carefully selected to produce a powerful synergistic effect. Here is a list of the key ingredients in Red Boost and how they can support overall health and well-being:

  11. Fluxactive is a comprehensive dietary supplement made up of herbal extracts. This supplement is high in nutrients, which can properly nourish your body and significantly improve prostate health. Some of these ingredients have even been shown to lower the risk of prostate cancer.

  12. Your posts always provide me with a new perspective and encourage me to look at things differently Thank you for broadening my horizons

  13. Sugar Defender orchestrates a reduction in blood sugar levels through multifaceted pathways. Its initial impact revolves around enhancing insulin sensitivity, optimizing the body’s efficient use of insulin, ultimately leading to a decrease in blood sugar levels. This proactive strategy works to prevent the storage of glucose as fat, mitigating the risk of developing type 2 diabetes.

  14. Sugar Defender stands as a beacon of natural, side-effect-free blood sugar support. Crafted from a blend of pure, plant-based ingredients, this formula not only helps regulate blood sugar levels but also empowers you on your journey to weight loss, increased vitality, and overall life improvement.

  15. Metanail Serum Pro is an effective solution specifically formulated to combat toenail fungus and brittle nails. Its exceptional effectiveness stems from its ability to target the primary culprit behind toenail fungus, known as T. Rubrum.

  16. I am blown away by the depth and detail in your posts Keep up the excellent work and thank you for sharing your knowledge with us

  17. I appreciate how well-researched and detailed your posts are It’s evident that you put a lot of time and effort into providing valuable information to your readers

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注