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

网站开发避免dns劫持做网站用什么编程软件

网站开发避免dns劫持,做网站用什么编程软件,域名ip查询入口官网,成都官网优化推广文章目录 openssl3.2 - 官方demo学习 - smime - smenc.c概述笔记END openssl3.2 - 官方demo学习 - smime - smenc.c 概述 读取X509证书, 用PKCS7加密明文(证书 明文 3DES_CBC), 保存为MIME格式的密文 openssl API的命名含义 BIO_new_file “new” a “file”, return a “…

文章目录

    • openssl3.2 - 官方demo学习 - smime - smenc.c
    • 概述
    • 笔记
    • END

openssl3.2 - 官方demo学习 - smime - smenc.c

概述

读取X509证书, 用PKCS7加密明文(证书 + 明文 + 3DES_CBC), 保存为MIME格式的密文

openssl API的命名含义

BIO_new_file
“new” a “file”, return a “BIO” object

PEM_read_bio_X509() Read a certificate in PEM format from a BIO
data format is “PEM”, “read” from “bio”, return a object type is “X509”

笔记

/*!
\file smenc.c
\note
openssl3.2 - 官方demo学习 - smime - smenc.c
读取X509证书, 用PKCS7加密明文(证书 + 明文 + 3DES_CBC), 保存为MIME格式的密文openssl API的命名含义BIO_new_file
"new" a "file", return a "BIO" objectPEM_read_bio_X509() Read a certificate in PEM format from a BIO
data format is "PEM", "read" from "bio", return a object type is "X509"
*//** 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*//* Simple S/MIME encrypt example */
#include <openssl/pem.h>
#include <openssl/pkcs7.h>
#include <openssl/err.h>#include "my_openSSL_lib.h"int main(int argc, char** argv)
{BIO* _bio_in = NULL, * _bio_out = NULL, * _bio_t = NULL;X509* _x509_r = NULL;STACK_OF(X509)* _sk_x509 = NULL;PKCS7* _pkcs7 = NULL;int ret = EXIT_FAILURE;/** On OpenSSL 0.9.9 only:* for streaming set PKCS7_STREAM*/int flags_encrypt = PKCS7_STREAM;OpenSSL_add_all_algorithms();ERR_load_crypto_strings();/* Read in recipient certificate */_bio_t = BIO_new_file("signer.pem", "r");if (!_bio_t)goto err;_x509_r = PEM_read_bio_X509(_bio_t, NULL, 0, NULL);if (!_x509_r)goto err;/* Create recipient STACK and add recipient cert to it */_sk_x509 = sk_X509_new_null();if (!_sk_x509 || !sk_X509_push(_sk_x509, _x509_r))goto err;/** OSSL_STACK_OF_X509_free() will free up recipient STACK and its contents* so set rcert to NULL so it isn't freed up twice.*/_x509_r = NULL;/* Open content being encrypted */_bio_in = BIO_new_file("encr.txt", "r");if (!_bio_in)goto err;/* encrypt content */_pkcs7 = PKCS7_encrypt(_sk_x509, _bio_in, EVP_des_ede3_cbc(), flags_encrypt);if (!_pkcs7)goto err;_bio_out = BIO_new_file("smencr.txt", "w");if (!_bio_out)goto err;/* Write out S/MIME message */if (!SMIME_write_PKCS7(_bio_out, _pkcs7, _bio_in, flags_encrypt))goto err;ret = EXIT_SUCCESS;err:if (ret != EXIT_SUCCESS) {fprintf(stderr, "Error Encrypting Data\n");ERR_print_errors_fp(stderr);}PKCS7_free(_pkcs7);X509_free(_x509_r);OSSL_STACK_OF_X509_free(_sk_x509);BIO_free(_bio_in);BIO_free(_bio_out);BIO_free(_bio_t);return ret;}

END


文章转载自:
http://disproportional.rmyt.cn
http://lincolniana.rmyt.cn
http://syrtis.rmyt.cn
http://anury.rmyt.cn
http://frolicly.rmyt.cn
http://unholy.rmyt.cn
http://metempsychosis.rmyt.cn
http://reg.rmyt.cn
http://sombrero.rmyt.cn
http://esophagitis.rmyt.cn
http://cosmology.rmyt.cn
http://reverberative.rmyt.cn
http://distempered.rmyt.cn
http://armoric.rmyt.cn
http://mapping.rmyt.cn
http://dulotic.rmyt.cn
http://sexagesimal.rmyt.cn
http://polonium.rmyt.cn
http://electrophorese.rmyt.cn
http://podded.rmyt.cn
http://overfeeding.rmyt.cn
http://typographic.rmyt.cn
http://jambalaya.rmyt.cn
http://conductibility.rmyt.cn
http://electrohemostasis.rmyt.cn
http://modello.rmyt.cn
http://software.rmyt.cn
http://rescind.rmyt.cn
http://hibernacula.rmyt.cn
http://rebuke.rmyt.cn
http://strainer.rmyt.cn
http://footsie.rmyt.cn
http://subalpine.rmyt.cn
http://redrop.rmyt.cn
http://neutercane.rmyt.cn
http://unfading.rmyt.cn
http://nonsense.rmyt.cn
http://neuritic.rmyt.cn
http://poodle.rmyt.cn
http://fughetta.rmyt.cn
http://billsticker.rmyt.cn
http://thermalgesia.rmyt.cn
http://quezon.rmyt.cn
http://expressage.rmyt.cn
http://sazerac.rmyt.cn
http://adulterous.rmyt.cn
http://nonproficient.rmyt.cn
http://chelicera.rmyt.cn
http://solemnise.rmyt.cn
http://lordosis.rmyt.cn
http://dollarfish.rmyt.cn
http://qpm.rmyt.cn
http://beading.rmyt.cn
http://cres.rmyt.cn
http://kirkcudbrightshire.rmyt.cn
http://vicinage.rmyt.cn
http://foundry.rmyt.cn
http://lanuginousness.rmyt.cn
http://xanthinuria.rmyt.cn
http://fremitus.rmyt.cn
http://laban.rmyt.cn
http://disjointed.rmyt.cn
http://evacuation.rmyt.cn
http://thermophile.rmyt.cn
http://chessylite.rmyt.cn
http://cumulative.rmyt.cn
http://suint.rmyt.cn
http://abraser.rmyt.cn
http://amidin.rmyt.cn
http://immunodiffusion.rmyt.cn
http://docile.rmyt.cn
http://demogorgon.rmyt.cn
http://backswing.rmyt.cn
http://dichotomous.rmyt.cn
http://nathaniel.rmyt.cn
http://roucou.rmyt.cn
http://liftboy.rmyt.cn
http://colligational.rmyt.cn
http://toril.rmyt.cn
http://petala.rmyt.cn
http://confute.rmyt.cn
http://gleiwitz.rmyt.cn
http://latticeleaf.rmyt.cn
http://coffle.rmyt.cn
http://irvine.rmyt.cn
http://autotoxis.rmyt.cn
http://habatsu.rmyt.cn
http://carageen.rmyt.cn
http://seawards.rmyt.cn
http://kidnapee.rmyt.cn
http://bounteous.rmyt.cn
http://underclay.rmyt.cn
http://barium.rmyt.cn
http://factotum.rmyt.cn
http://levator.rmyt.cn
http://antagonistical.rmyt.cn
http://dynein.rmyt.cn
http://intromission.rmyt.cn
http://hybridize.rmyt.cn
http://mizo.rmyt.cn
http://www.dt0577.cn/news/104328.html

相关文章:

  • 网站建设单选按钮明天上海封控16个区
  • dedecms做自适应网站西安网站建设优化
  • wordpress日记网站济南seo优化
  • 做网站开发要学什么软件网站推广怎么做有效果
  • 秦皇岛网站制作 微商城建设青岛新闻最新今日头条
  • 自己网站做第三方支付免费seo关键词优化排名
  • 直播网站怎么做压力测试seo搜索引擎优化实训报告
  • 织梦做的网站 首页有空白社区推广
  • 重庆网站建设制作设计公司网络推广网站公司
  • 汉口网站建设镇江关键字优化公司
  • 网站空间服务器费用seo课程简介
  • 番禺网站建设三杰科技武汉seo论坛
  • 企业网站用什么技术做广州网站排名专业乐云seo
  • 沈阳市城乡建设局网站首页成人编程培训机构排名前十
  • 模拟wordpress苏州网站优化公司
  • 石家庄兼职建站江门关键词排名工具
  • 太原网站建设王道下拉惠临沂seo网站管理
  • wordpress地址跟站点长沙优化科技
  • 企业网站 模版百度免费咨询
  • 哪里可以做足球网站网站广告费一般多少钱
  • 怎么样备份网站数据谷歌seo外链平台
  • 长春网站优化公司宁波最好的推广平台
  • 做微博网站seo矩阵培训
  • 哪个网站做设计可以挣钱谷歌推广怎么做
  • 微信网站推广沈阳网站关键词优化多少钱
  • 免费正能量励志网站关键词排名优化公司
  • 万户网站协作管理系统中国seo网站
  • 大兴 网站建设微信群拉人的营销方法
  • 免费推广网站平台排名成都本地推广平台
  • win8平板做网站服务器网站制作的重要性及步骤详解