从官网下载openssl源码和 libcurl源码。OpenSSL顺利交叉编译通过。
ssl需要依赖openssl,必须在编译swoole时启用–enable-openssl
nginx下载官网:下载地址:https://nginx.org/en/download.html
openssl 命令是强大的安全套接字层密码库。OpenSSL 是一种开源命令行工具,通常用于生成私钥,创建 CSR,安装 SSL / TLS 证书以及标识证书信息。
需要部署nginx的https环境,之前是yum安装的openssl,版本比较低,如下: [root@nginx ~]# yum install -y pcre pcre-devel openssl openssl-devel gcc [root@nginx ~]# openssl version -a OpenSSL 1.0.1e-fips 11 Feb 2013 built on: Wed Mar 22 21:43:28 UTC 2017 platform: linux-x86_64 options:
编译环境 Ubuntu 16.04 x86_64 himix2000 编译工具链 下载openssl源码 wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz 解压源码 tar xvf openssl-1.1.1d.tar.gz 执行Configure脚本 ./Configure linux-generic32 \ no-shared \ no-asm \ --prefix=/ilock/dist/himix200_openssl_11
在TOB业务中部署在服务器中的程序可能会被窃取.对此设计一套安全模块,通过设备信息, 有效期,业务信息的确认来实现业务安全, 主要使用openssl进行加密, upx进行加壳。 为精简服务, 使用模块化方式设计. 优点: 体量较小, 易于内嵌和扩展 缺点: 暂未提供对外生成私钥的接口 基本思路 RSA2048加密授权信息(依据NIAT SP800-57要求, 2011年-2030年业务至少使用RSA2048): 硬件信息(MAC/CPU), 有效期, 服务版本号, 业务信息 公钥代码写死,随版本更新
在OpenSSL的官网上可以看到三个分支,分别是openssl-、openssl-fips-、openssl-fips-ecp-。这三者的区别如下。
OpenSSL全称为Secure Socket Layer。是Netscape所研发。利用数据加密(Encryption)作技术保障在Internet上传输数据的安全。可确保数据在网络上的传输不会被窃听及截取。当然,OpenSSL是一个强大的password库,我们在使用SSL协议的时候不一定非得採用OpenSSL,只是眼下基本上都是用的OpenSSL,由于它更安全。使用起来也更简单。
openssl 3.0发布好一阵子了,我的 atframe_utils 其实也挺早前就完成了对 openssl 3.0 和 boringssl 的适配。但是由于懒,一直没写这篇文章。在升级 [openssl] 3.0 和 boringssl 还是碰到了一些问题的,有些是由于接口变化,有些是由于功能支持还有些也和构建系统相关。还是有必要记录一下,至少能方便以后查找。
非对称加密:即两端使用一对不同的密钥进行加密。 在非对称加密中,需要两对密钥,公钥和私钥。 公钥个私钥属于对立关系,一把加密后,只有另一把才可以进行解密。 公钥数据加密 数字证书内包含了公钥,在进行会话连接时,双方交换各自的公钥,保留自己的私钥。进行数据传输时,利用对方的公钥进行数据加密。加密后的数据只有对方的私钥才能进行解密。 私钥数字签名 私钥进行数据加密,所有人用公钥都能解密数据,但是加密后的数据却唯有私钥能生成。可以用于消息来源验证。将数据用私钥加密并明文告诉用户密文内容,用户进行公钥
前面有几篇blog就提到我有计划支持使用ECDH密钥交换。近期也是抽空把以前的DH密钥交换跨平台适配从atgateway抽离出来,而后接入了ECDH流程。
打开根目录下的build.info, 注释下面几行, 在Line:590~594, 否则会有类似错误提示 ${LDCMD:-g++} ld: unknown option: --sysroot=.
笔者在使用 `rbenv`[1] 安装 ruby 时,遇到一个头文件缺失导致无法编译失败的问题。
如果仍然有冲突继续删除提示中的文件,直到brew link --overwrite node执行成功。
理论上可以调整为比512更小的数值,但是不推荐。仅支持512,758,1024,1536,2048几个固定的数值长度不要随便写哦。
(1)保护数据安全:加密可以将文件内容转化为不可读或难以理解的形式,防止未经授权的人员获取敏感信息。只有拥有正确解密密钥的人员才能还原出可读的文件内容。这样可以有效地防止数据泄露、窃取或篡改,保护用户的隐私和机密信息。
最近使用IDA Pro查看一个x86的exe文件,发现为静态编译文件,其中包含大量的OpenSSL的库函数,于是上网搜索对应的签名文件,并没有找到该版本OpenSSL的库函数签名,便亲自做一个签名文件。
PHP 5 安装 : PHP官网: www.php.net 当前主流版本为5.6/7.1 按照约定,切换到下载目录,下载PHP 5.6 wget http://cn2.php.net/distributions/php-5.6.30.tar.gz tar zxvf php-5.6.30.tar.gz cd php-5.6.30 ---- 编译&安装 ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2.4/bin/apxs
作为一名 DBA 碰到过升级出问题需要回退么?碰到过回退还解决不了问题么?我有幸遇到了一次凶险的升级“血案”。
由于诸多原因,前几天抽了点时间在网上找了一些OpenSSL的资料。网上的资料鱼龙混杂,我看原创的并不多。部分资料是讲OpenSSL命令行的操作,另一部分(基本上转载的那样一两篇)是Linux下的OpenSSL的API。
本文出处:Java中使用OpenSSL生成的RSA公私钥进行数据加解密_Slash Youth – Jack Chai-CSDN博客_java生成rsa公私钥,转载请注明。由于本人不定期会整理相关博文,会对相应内容作出完善。因此强烈建议在原始出处查看此文。
用“-Wl,-Bstatic”指定链接静态库,使用“-Wl,-Bdynamic”指定链接共享库,使用示例: -Wl,-Bstatic -lmysqlclient_r -lssl -lcrypto -Wl,-Bdynamic -lrt -Wl,-Bdynamic -pthread -Wl,-Bstatic -lgtest ("-Wl"表示是传递给链接器ld的参数,而不是编译器gcc/g++的参数。) 1) 下面是因为没有指定链接参数-lz(/usr/lib/libz.so,/usr/lib/libz.a ) /usr/local/mysql/lib/mysql/libmysqlclient.a(my_compress.c.o): In function `my_uncompress': /home/software/mysql-5.5.24/mysys/my_compress.c:122: undefined reference to `uncompress' /usr/local/mysql/lib/mysql/libmysqlclient.a(my_compress.c.o): In function `my_compress_alloc': /home/software/mysql-5.5.24/mysys/my_compress.c:71: undefined reference to `compress' 2) 下面是因为没有指定编译链接参数-pthread(注意不仅仅是-lpthraed) /usr/local/mysql/lib/mysql/libmysqlclient.a(charset.c.o): In function `get_charset_name': /home/zhangsan/mysql-5.5.24/mysys/charset.c:533: undefined reference to `pthread_once' 3) 下面这个是因为没有指定链接参数-lrt /usr/local/thirdparty/curl/lib/libcurl.a(libcurl_la-timeval.o): In function `curlx_tvnow': timeval.c:(.text+0xe9): undefined reference to `clock_gettime' 4) 下面这个是因为没有指定链接参数-ldl /usr/local/thirdparty/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup': dso_dlfcn.c:(.text+0x4c): undefined reference to `dlopen' dso_dlfcn.c:(.text+0x62): undefined reference to `dlsym' dso_dlfcn.c:(.text+0x6c): undefined reference to `dlclose' 5) 下面这个是因为指定了链接参数-static,它的存在,要求链接的必须是静态库,而不能是共享库 ld: attempted static link of dynamic object 如果是以-L加-l方式指定,则目录下必须有.a文件存在,否则会报-l的库文件找不到:ld: cannot find -lACE 6) GCC编译遇到如下的错误,可能是因为在编译时没有指定-fPIC,记住:-fPIC即是编译参数,也是链接参数 relocation R_x86_64_32S against `vtable for CMyClass` can not be used when making a shared object 7) 下面的错误表示gcc编译时需要定义宏__STDC_FORMAT_MACROS,并且必须包含头文件inttypes.h test.cpp:35: error: expected `)' before 'PRIu64' 8) 下面是因为在x86机器(32位)上编译没有指定编译参数-march=pentium4 ../../src/common/libmooon.a(logger.o): In function `atomic_dec_and_test': ../../include/mooon/sys/atomic_gcc.h:103: undefined reference to `__sync_sub_and_fetch_4' 9) 下列错误可能是因为多了个“}” error: expected d
通过上面的查看,明显我们的版本号太低了,于是google了下,找到了http://apple.stackexchange.com/questions/126830/how-to-upgrade-openssl-in-os-x。
【转载请注明出处】:https://cloud.tencent.com/developer/article/1627571
《FFmpeg开发实战:从零基础到短视频上线》一书的“10.2 FFmpeg推流和拉流”提到直播行业存在RTSP和RTMP两种常见的流媒体协议。除此以外,还有比较两种比较新的流媒体协议,分别是SRT和RIST。
博客已经许多月没有继续更新了,近期刚好有个粉丝在做直播实时流转发,需要构建推流服务器,像我提出了一些nginx构建的问题,捧着自己的粉丝请教(当时一头雾水:我只是个小安卓),但是还是专门花了一天的时间研究了下推流服务器(直播实时流服务器)RTMP流媒体服务器,现在网上现成的开源方案有很多,有SRS,Red5,wowoza,FMS等,我这里使用的是Nginx的rtmp插件实现实时流转发。
有了上面的基础那么传输文件的实现就变得简单了,在传输时通常我们需要打开文件,并每次读入1024个字节的数据包,通过SSL加密传输即可,此处的文件传输功能在原生套接字章节中也进行过详细讲解,此处我们还是使用原来的密钥对,实现一个服务端等待客户端上传,当客户端连接到服务端后则开始传输文件,服务端接收文件的功能。
PostgreSQL 有一个对使用 SSL 连接加密客户端/服务器通讯的本地支持,它可以增加安全性。这个特性要求在客户端和服务器端都安装 OpenSSL 并且在编译 PostgreSQL 的时候打开这个支持(见Chapter 16)。
最近在复习 HTTP 协议的时候,突然想起来很早之前就对自己的项目进行过Nginx支持从 HTTP 1.1 -> SPDY 的升级。但是后来好像没成功就搁置了。
nasm需要手动配置环境变量。ActivePerl下载下来一路next安装就好了。
因为项目的原因,最近经常使用node.js搭RESTful接口。 性能还是很不错啦,感觉比Spring Boot之类的要快。而且在不错的性能之外,只要程序结构组织好,别让太多的回调把程序结构搞乱,整体开发效率比Java快的就太多了。
解决方法:可能是由于粘贴网页上的代码的时候两行之间的回车引起的,有未识别的回车或者换行,找到,删除掉就 OK了。
最近看到了国内开源的一个名为OpenNJet的项目,有一个响亮的口号:“下一代云原生应用引擎”。
在过去,树莓派官方系统,拥有默认用户pi,初始化密码为raspberry;但是,因为一些安全性的原因,在2022年4月后,取消系统默认的pi用户:
在我们的《C/C++ 网络编程实战训练营》第二课,我们给大家布置了两个作业,其中之一是为 Nginx 源码制作一个 Visual Studio 工程文件,可以在 Visual Studio 中调试 Windows 版本的 Nginx,这个作业的目的是:
[主机要映射容器的端口号]:[容器内部对应的端口号] 容器对应的端口号不要改变,主机要映射容器的端口号可以改变,要记得在安全组放通
最近由于工作需求要搭建freeswitch,整个过程比较纠结,遂总结于此留作备忘。
BareSIP是开源的SIP协议栈,我们可以基于BareSIP开发软电话应用。我们可以在项目中直接引入BareSIP的库,也可以将BareSIP的源代码引入到项目中,目前BareSIP还不是很稳定,因此,使用后者的方式方便我们对BareSIP进行二次开发以及修改问题。
在离线环境下,使用anaconda创建环境的时候,需要指定Python的版本,但是无法自动下载,需要手动下载Python包,然后用conda进行安装。
运行,ls 会看到一个INSTALL文件,(如果没有INSTALL文件就找README文件)进去会看到安装流程:(一次执行这四部操作即可)
我之前make时如果将openssl放到root目录可能会编译报错,/usr/local就没报错,没报错就不要改下面文件了
https://github.com/eyjian/libmooon/releases
登录http://www.gnu.org/software/bison/网站,如下图所示选择进入下载界面:
上传到指定目录输入命令rz (如果没有这个命令 需要安装lrzsz插件 命令 yum -y install lrzsz)
问题版本:0.9.0 make[4]: Entering directory `/tmp/X/thrift-0.9.0/lib/cpp' /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/thirdparty/boost/include -I./src -I./src/thrift -I/usr/local/thirdparty/openssl/include -Wall -g -O2 -MT Thrift.lo -MD -MP -MF .deps/Thrift.Tpo -c -o Thrift.lo `test -f 'src/thrift/Thrift.cpp' || echo './'`src/thrift/Thrift.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/thirdparty/boost/include -I./src -I./src/thrift -I/usr/local/thirdparty/openssl/include -Wall -g -O2 -MT Thrift.lo -MD -MP -MF .deps/Thrift.Tpo -c src/thrift/Thrift.cpp -fPIC -DPIC -o .libs/Thrift.o In file included from src/thrift/Thrift.cpp:22: /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cstdlib:119: error: '::malloc' has not been declared /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cstdlib:127: error: '::realloc' has not been declared src/thrift/Thrift.cpp: In member function 'void apache::thrift::TOutput::printf(const char*, ...)': src/thrift/Thrift.cpp:46: error: 'malloc' was not declared in this scope make[4]: *** [Thrift.lo] Error 1 解决方法: 在成功执行configure后(在未执行configure之前找不到下列两行),修改与configure同目录下的config.h文件,将文件中的如下两行注释掉: #define malloc rpl_malloc #define realloc rpl_realloc 附1:安装Thrift命令行: ./configure --prefix=/usr/local/thirdparty/thrift-0.9.0 --with-boost=/usr/local/thirdparty/boost --with-libevent=/usr/local/thirdparty/libevent CPPFLAGS="-I/usr/local/thirdparty/openssl/include" LDFLAGS="-ldl -L/usr/local/thirdparty/openssl/lib" --with-qt4=no --with-c_glib=no --with-csharp=no --with-erlang=no --with-perl=no --with-ruby=no --with-haskell=no --with-go=no --with-d 当OpenSSL未以默认安装目录时,请注意上面的用法。 附2:相关博文: (安装thrift时,注意openssl参数)http://blog.chinaunix.net/uid-20682147-id-3399150.html 如果在使用Thrift时,编译遇到类似“TTransport.h:107: error: 'uint32_t' does not name a type”的错误,只需要在Thrift.h文件中增加一行:#include 。 Thrift.h文件位于make install后的include目录下,如果不知道在哪,可以使用find命令查找。
参考:Ubuntu 16.04 升级Openssh 8.8P1 Ubuntu 16 更新openssh 8.8
由于Apache HTTP Server官方不提供二进制(可执行)的发行版,所以我们选择一些贡献者编译完成的版本,我们选择第一个ApacheHaus
编译 nginx, 需要 zlib 包, pcre 包, --with-http_ssl_module 模块, 需要 openssl 包
领取专属 10元无门槛券
手把手带您无忧上云