- 1、本文档共6页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
用openssl进行ssl编程(Programming with SSL using OpenSSL)
用openssl进行ssl编程(Programming with SSL using OpenSSL)
The main introduction of OpenSSL SSL communication functions and procedures, mainly the initialization process, as for data reception and subsequent processing, specific problems can be analyzed.
Load all the SSL algorithms
Openssl_add_ssl_algorithms ();
Build method for SSL
Ssl_method, *meth=sslv23_method ();
Initializing context scenarios
Ssl_ctx *ctx=ssl_ctx_new (meth);
Ret-quiet_shutdown=1; the default is ret-quiet_shutdown=0; he is equivalent to the ssl_set_shutdown function and sets the parameter to ssl_sent_shutdown|ssl_received_shutdown
When set to 1, if you do not notify each other after closing, this is not suitable for TLS standards
Ssl_ctx_set_quiet_shutdown (CTX, 1);
Ctx-options|=ssl_op_all, ssl/tls has several recognized bug, so that the setting makes the possibility of error smaller
Ssl_ctx_set_options (CTX, ssl_op_all);
Set the size of the cache, the default is 1024*20=20000, which is how many session_id can be stored, and generally do not need to change. If it was 0, it would be infinite
Ssl_ctx_sess_set_cache_size (CTX, 128);
Ssl_ctx_load_verify_locations is used to load a trusted CA certificate, and if cafile is not null, then the file he points to contains one or more certificates in the PEM encoding format, and e.g. can be used to brief the certificate contents
If capath is not null, it points to a directory containing the PEM Certificate in the CA format. Each file in the directory contains a CA certificate. The file name is the hash value of the CA name in the certificate
You can build this directory with c-rehash, such as CD /some/where/certs (including a lot of trusted CA certificates), c_rehash. Returns a success, and 0 fails. Ssl_ctx_set_default_verify_paths looks for the default validation path, which is definitely not found here.
The main set cert_store here
Char, *cafile=null, *capath=null;
Ssl_ctx_load_verify_locations (CTX, cafile, capath);
When client authentication is required, the
您可能关注的文档
- 玻璃纤维桩修复残根残冠的临床观察(Clinical observation of glass fiber post for restoration of residual roots and crowns).doc
- 玻璃清洗(Glass cleaning).doc
- 珍珠奶茶制作方法(Method for making pearl milk tea).doc
- 玻璃检测(Glass inspection).doc
- 玻璃纤维增强型复合树脂桩核修复基牙折断烤瓷牙效果观察(Effect of glass fiber reinforced composite resin post core for restoration of abutment fracture of porcelain fused to tooth).doc
- 珐琅铸铁锅(Enameled iron pot).doc
- 珠光粉详细说明(Pearl powder detail).doc
- 珠宝摄影攻略(Jewelry photography).doc
- 珠心算的坏处珠心算的好处!(Mental harm The benefits of abacus!).doc
- 珠峰测量(Mount Everest survey).doc
- 用什么软件能测试笔记本电脑是否稳定(What software can be used to test whether the laptop is stable).doc
- 用友u8存货核算流程(UF U8 inventory accounting process).doc
- 用大宇宙观透视互联网思维(Perspective of Internet thinking from the perspective of macrocosm).doc
- 用vc++ 6.0来编译wdm驱动(Compiling WDM drivers using vc++ 6).doc
- 用友u8年度账打印方法(总账明细账现金银行日记账)(UF U8 annual account printing method (ledger, subsidiary ledger, cash, bank journal)).doc
- 用户界面和易用性测试(User interface and usability testing).doc
- 用《弟子规》重建企业企业培训文化(Rebuilding the training culture of enterprise and enterprise with disciple regulation).doc
- 用户界面测试(User interface test).doc
- 用好适合自己汽车压缩比的油(Use the oil that is suitable for your car's compression ratio).doc
- 生活常识问答(Life quiz).doc
最近下载
- 预防接种培训试题(预防接种培训试题).docx VIP
- 卫生院优质服务基层行:4.3.1财务管理:【B-2】工作制度 (1).docx VIP
- iSecure Center综合安防管理平台配置手册 V2.1.0.pdf VIP
- 《免疫与计划免疫》精品课件 (1).ppt VIP
- NB╱T 10385-2020 水电工程生态流量实时监测系统技术规范.pdf VIP
- NB_T 10385-2020 《水电工程生态流量实时监测系统技术规范》.docx VIP
- 基本不等式-高考历年真题.doc VIP
- 水电工程生态流量实时监测系统-技术规范.pdf VIP
- 预防接种及计划免疫PPT课件.ppt VIP
- 管道工程测量施工方案(3篇).docx VIP
文档评论(0)