当前位置: 首页 > news >正文

免费网站建站教程中国企业500强怎么评的

免费网站建站教程,中国企业500强怎么评的,小学校园网站建设方案,wordpress linux伪静态文章目录 openssl3.2 - 官方demo学习 - smime - smsign2.c概述笔记END openssl3.2 - 官方demo学习 - smime - smsign2.c 概述 PKCS7联合签名 从N张证书中, 分别得到N对(x509和私钥) 对明文进行签名(只是指定了bio_in和flag), 得到pkcs7* 对此pkcs7进行附加签名者的操作(指定证… 文章目录 openssl3.2 - 官方demo学习 - smime - smsign2.c概述笔记END openssl3.2 - 官方demo学习 - smime - smsign2.c 概述 PKCS7联合签名 从N张证书中, 分别得到N对(x509和私钥) 对明文进行签名(只是指定了bio_in和flag), 得到pkcs7* 对此pkcs7进行附加签名者的操作(指定证书和私钥), 有几个联合签名者, 就进行几次操作 将签名数据pkcs7写为密文 笔记 /*! \file smsign2.c \note openssl3.2 - 官方demo学习 - smime - smsign2.cPKCS7联合签名 从N张证书中, 分别得到N对(x509*和私钥*) 对明文进行签名(只是指定了bio_in和flag), 得到pkcs7* 对此pkcs7进行附加签名者的操作(指定证书*和私钥*), 有几个联合签名者, 就进行几次操作 将签名数据pkcs7写为密文 *//** Copyright 2007-2023 The OpenSSL Project Authors. All Rights Reserved.** Licensed under the Apache License 2.0 (the License). You may not use* this file except in compliance with the License. You can obtain a copy* in the file LICENSE in the source distribution or at* https://www.openssl.org/source/license.html*//* S/MIME signing example: 2 signers. OpenSSL 0.9.9 only */ #include openssl/pem.h #include openssl/pkcs7.h #include openssl/err.h#include my_openSSL_lib.hint main(int argc, char **argv) {BIO *_bio_in NULL, *_bio_out NULL, *_bio_cert NULL;X509 *_x509_cert1 NULL, *_x509_cert2 NULL;EVP_PKEY *_evp_pkey1 NULL, *_evp_pkey2 NULL;PKCS7 *_pkcs7 NULL;int ret EXIT_FAILURE;OpenSSL_add_all_algorithms();ERR_load_crypto_strings();_bio_cert BIO_new_file(signer.pem, r);if (!_bio_cert)goto err;_x509_cert1 PEM_read_bio_X509(_bio_cert, NULL, 0, NULL);BIO_reset(_bio_cert);_evp_pkey1 PEM_read_bio_PrivateKey(_bio_cert, NULL, 0, NULL);BIO_free(_bio_cert);_bio_cert BIO_new_file(signer2.pem, r);if (!_bio_cert)goto err;_x509_cert2 PEM_read_bio_X509(_bio_cert, NULL, 0, NULL);BIO_reset(_bio_cert);_evp_pkey2 PEM_read_bio_PrivateKey(_bio_cert, NULL, 0, NULL);if (!_x509_cert2 || !_evp_pkey2)goto err;_bio_in BIO_new_file(sign.txt, r);if (!_bio_in)goto err;_pkcs7 PKCS7_sign(NULL, NULL, NULL, _bio_in, PKCS7_STREAM | PKCS7_PARTIAL);if (!_pkcs7)goto err;/* Add each signer in turn */if (!PKCS7_sign_add_signer(_pkcs7, _x509_cert1, _evp_pkey1, NULL, 0))goto err;if (!PKCS7_sign_add_signer(_pkcs7, _x509_cert2, _evp_pkey2, NULL, 0))goto err;_bio_out BIO_new_file(smout.txt, w);if (!_bio_out)goto err;/* NB: content included and finalized by SMIME_write_PKCS7 */if (!SMIME_write_PKCS7(_bio_out, _pkcs7, _bio_in, PKCS7_STREAM))goto err;ret EXIT_SUCCESS;err:if (ret ! EXIT_SUCCESS) {fprintf(stderr, Error Signing Data\n);ERR_print_errors_fp(stderr);}PKCS7_free(_pkcs7);X509_free(_x509_cert1);EVP_PKEY_free(_evp_pkey1);X509_free(_x509_cert2);EVP_PKEY_free(_evp_pkey2);BIO_free(_bio_in);BIO_free(_bio_out);BIO_free(_bio_cert);return ret; } END
http://www.dnsts.com.cn/news/18540.html

相关文章:

  • 地方资讯网站源码重庆营销网站建设公司排名
  • 自己做的网站如何让qq登录连云港网站建设优化
  • 云主机 网站吗沧州建设厅网站
  • 做视频图片博客网站有哪些网站图片展示代码
  • 云南哪有网站建设报价的桂林市区到阳朔有多远
  • 昌邑网站建设公司做网站一年赚80亿
  • 网站模板 使用阿里云搭建公司网站
  • 怎么做qq靓号网站四川建设网上班时间
  • 做网站的外包能学到什么推广赚钱软件
  • 注册了域名怎样做网站网站分析报告范文2000
  • 建设网站的方案中铁建设集团门户网登录网站
  • 做问答网站要多少钱湖南省郴州市十大旅游景点排行榜
  • 展示型网站开发做网站的不给源文件
  • 静态网站 后台网站内容规划流程
  • 广州做网站海珠信科新手想写小说怎么做网站
  • 长沙产品网站建设软件开发详细设计文档
  • 网站建设推广有用吗12.12做网站的标题
  • 免费网站域名使用免备案的网站首页
  • 网站建没有前景加强网站基础建设
  • 外贸网站建设推广优化微网站排版
  • 如何在淘宝网做自己的网站wordpress 配置邮箱
  • 临沧网站建设公司哈尔滨手机网站建设价格
  • 网站seo注意事项哪个公司网站设计好
  • google提交网站淮安市专用汽车制造有限公司网页设计
  • 网站建站制作重庆市建设工程信息网招标
  • 织梦网站做瀑布流方便WordPress注册邮件美化
  • 做哪一类网站容易有排名wordpress 2017 主题
  • 多元网站建设欧美网站源码
  • 烟台网站建设ytwzjs许昌长葛网站建设制作设计
  • 东台网站建设找哪家好镇江vi设计