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

php音乐外链网站源码网络公司经营范围可以加技术培训

php音乐外链网站源码,网络公司经营范围可以加技术培训,装饰公司怎么拉客户,17一起做网站文章目录 openssl3.2 - 官方demo学习 - saccept.cEND openssl3.2 - 官方demo学习 - saccept.c 建立TLSServer(使用了证书, 和证书中的私钥), 接收客户端的连接, 并将客户端发来的信息打印到屏幕 笔记 /*! \file saccept.c */ /*! \brief 建立TLSServer(使用了证书, 和证书中… 文章目录 openssl3.2 - 官方demo学习 - saccept.cEND openssl3.2 - 官方demo学习 - saccept.c 建立TLSServer(使用了证书, 和证书中的私钥), 接收客户端的连接, 并将客户端发来的信息打印到屏幕 笔记 /*! \file saccept.c */ /*! \brief 建立TLSServer(使用了证书, 和证书中的私钥)接收客户端的连接, 并将客户端发来的信息打印到屏幕 *//** Copyright 1998-2017 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*//*-* A minimal program to serve an SSL connection.* It uses blocking.* saccept host:port* host is the interface IP to use. If any interface, use *:port* The default it *:4433** cc -I../../include saccept.c -L../.. -lssl -lcrypto -ldl*/#include stdio.h #include signal.h #include stdlib.h #include openssl/err.h #include openssl/ssl.h#pragma comment(lib, libcrypto.lib) #pragma comment(lib, libssl.lib)#include openssl/applink.c /*! for OPENSSL_Uplink(00007FF8B7EF0FE8,08): no OPENSSL_Applink */#define CERT_FILE server.pemstatic volatile int done 0;void interrupt(int sig) {done 1; }// linux才有的信号处理, VS2019中没有 #ifdef __unix__ void sigsetup(void) {struct sigaction sa;/** Catch at most once, and dont restart the accept system call.*/sa.sa_flags SA_RESETHAND;sa.sa_handler interrupt;sigemptyset(sa.sa_mask);sigaction(SIGINT, sa, NULL); } #else void sigsetup(void) {} #endif // #ifdef __unix__int main(int argc, char *argv[]) {char *port NULL;BIO *in NULL;BIO *ssl_bio, *tmp;SSL_CTX *ctx;char buf[512];int ret EXIT_FAILURE, i;if (argc 1)port *:4433;elseport argv[1];ctx SSL_CTX_new(TLS_server_method());if (!SSL_CTX_use_certificate_chain_file(ctx, CERT_FILE))goto err;if (!SSL_CTX_use_PrivateKey_file(ctx, CERT_FILE, SSL_FILETYPE_PEM))goto err;if (!SSL_CTX_check_private_key(ctx))goto err;/* Setup server side SSL bio */ssl_bio BIO_new_ssl(ctx, 0);if ((in BIO_new_accept(port)) NULL)goto err;/** This means that when a new connection is accepted on in, The ssl_bio* will be duplicated and have the new socket BIO push into it.* Basically it means the SSL BIO will be automatically setup*/BIO_set_accept_bios(in, ssl_bio);/* Arrange to leave server loop on interrupt */sigsetup();again:/** The first call will setup the accept socket, and the second will get a* socket. In this loop, the first actual accept will occur in the* BIO_read() function.*/if (BIO_do_accept(in) 0)goto err;while (!done) {// 阻塞的读i BIO_read(in, buf, 512);if (i 0) {/** If we have finished, remove the underlying BIO stack so the* next time we call any function for this BIO, it will attempt* to do an accept*/printf(Done\n);tmp BIO_pop(in);BIO_free_all(tmp);goto again;}if (i 0)goto err;fwrite(buf, 1, i, stdout);fflush(stdout);}ret EXIT_SUCCESS;err:if (ret ! EXIT_SUCCESS)ERR_print_errors_fp(stderr);BIO_free(in);return ret; } END
http://www.dnsts.com.cn/news/224430.html

相关文章:

  • 网站域名 邮箱做设计的网站
  • 景点网站建设方案以做网站为毕设
  • 建设官方网站怎么登录标准企业网站开发合同
  • 微信网站开发公司内容营销公司
  • 西安手机网站建设win2003 iis做网站
  • 乐清网络问效平台正规seo排名公司
  • 高端网站开放对网站的建议
  • 杭州网站优化外包北京城乡建设门户网站
  • 网站建设优化扬州南山网站设计费用
  • 郑州建设银行网站房贷网点在哪域名查询解析
  • 电话投放小网站如何建设内部网站
  • 大型建设网站宿州网站推广
  • html可以做网站分页小程序定制开发话术
  • 网站做百度推广为什么没人咨询天元建设集团有限公司宋卫志
  • qq官方网站阜新网站优化
  • 公司网站开发设计题目怎么写微盟小程序模板
  • 静态网站制作视频wordpress 空白页面
  • 石排镇仿做网站天津网络建站模板
  • 如何自己做收费的视频网站内涵网站源码
  • 做服务器的网站都有哪些客户引流推广方案
  • 国外做直播网站企业网站建设策划书范文
  • 温州做网站建设公司哪家好wordpress 取消赞
  • 网站建设怎么进后台网站设计制作是什么
  • 网站开发数据库设计的作用站长之家源码
  • 东莞齐诺做网站asp.net 大网站
  • 正规网站做菠菜广告极构网站建设工作室
  • 汕头seo建站如何在720云网站做全景视频
  • 周口网站建设多少钱通信建设资质管理信息系统网站
  • 做网站思想最新清远发布
  • 东莞微网站建设费用自己的网站怎么做进销存