OpenSSL

Decrypting OpenSSL-encrypted file on Android with Java

左心房为你撑大大i 提交于 2021-02-06 14:05:43
问题 I'm currently trying to implement file decryption on my Android app. The file will be encrypted on host(Linux) using something like : openssl aes-128-ecb -salt -k $HASH -in somefile.in -out somefile openssl aes-256-cbc -salt -K $HASH -iv $IV -md sha1 -in somefile.in -out somefile openssl aes-256-cbc -d -salt -K $HASH -md sha1 -in somefile.in -out somefile The problem is that, I CANNOT get any of these combinations(128/256, ecb/cbc, salt/nosalt, -K/-k, -md/none) to properly decrypt on Android.

【Nginx安装】CentOS7安装Nginx及配置

柔情痞子 提交于 2021-02-06 10:29:14
Nginx是一款轻量级的网页服务器、反向代理服务器。相较于Apache、lighttpd具有占有内存少,稳定性高等优势。**它最常的用途是提供反向代理服务。** 安装 在Centos下,yum源不提供nginx的安装,可以通过切换yum源的方法获取安装。也可以通过直接下载安装包的方法,**以下命令均需root权限执行**: 首先安装必要的库(nginx 中gzip模块需要 zlib 库,rewrite模块需要 pcre 库,ssl 功能需要openssl库)。选定**/usr/ local**为安装目录,以下具体版本号根据实际改变。 1.安装gcc gcc-c++(如新环境,未安装请先安装) $ yum install -y gcc gcc-c++ 2.安装PCRE库 $ cd /usr/local/ $ wget http:/ /jaist.dl.sourceforge.net/project /pcre/pcre /8.33/pcre- 8.33.tar.gz $ tar -zxvf pcre- 8.36.tar.gz $ cd pcre- 8.36 $ ./configure $ make && make install 如报错 :configure: error: You need a C++ compiler for C++ support 解决 :yum install

SSL证书解析流程

倖福魔咒の 提交于 2021-02-06 07:54:25
SSL证书解析流程 如上图所示,在第 ② 步时服务器发送了一个SSL证书给客户端,SSL 证书中包含的具体内容有: (1)证书的发布机构CA (2)证书的有效期 (3)公钥 (4)证书所有者 (5)签名 ----- 签名就可以理解为是钞票里面的一个防伪标签。 客户端在接受到服务端发来的SSL证书时,会对证书的真伪进行校验,以浏览器为例说明如下: (1)首先浏览器读取证书中的证书所有者、有效期等信息进行一一校验 (2)浏览器开始查找操作系统中已内置的受信任的证书发布机构CA,与服务器发来的证书中的颁发者CA比对,用于校验证书是否为合法机构颁发 (3)如果找不到,浏览器就会报错,说明服务器发来的证书是不可信任的。 (4)如果找到,那么浏览器就会从操作系统中取出 颁发者CA 的公钥,然后对服务器发来的证书里面的签名进行解密 (5)浏览器使用相同的hash算法计算出服务器发来的证书的hash值,将这个计算的hash值与证书中签名做对比 (6)对比结果一致,则证明服务器发来的证书合法,没有被冒充 (7)此时浏览器就可以读取证书中的公钥,用于后续加密了 (8)client与web协商对称加密算法,client生成对称加密密钥并使用web公钥加密,发送给web服务器,web服务器使用web私钥解密 (9)使用对称加密密钥传输数据,并校验数据的完整性 所以相比HTTP,HTTPS 传输更加安全

Install Wildcard Certificate onto AWS EC2 Load Balancer

柔情痞子 提交于 2021-02-06 01:53:52
问题 I'm having trouble. I followed a guide that I found here http://www.thenetworkadministrator.net/index.php/2011/12/iis-ssl-certificate-into-amazon-elastic-load-balancer/ And exported by cert and created all those files, but it doesn't tell you which file goes in which field. I tried what I think is all the combinations but it doesn't accept it I Setup the balancer as follows Then I try to setup the certificate Then you can see it tells me it's invalid. In case it helps I exported from IIS and

Install Wildcard Certificate onto AWS EC2 Load Balancer

断了今生、忘了曾经 提交于 2021-02-06 01:47:42
问题 I'm having trouble. I followed a guide that I found here http://www.thenetworkadministrator.net/index.php/2011/12/iis-ssl-certificate-into-amazon-elastic-load-balancer/ And exported by cert and created all those files, but it doesn't tell you which file goes in which field. I tried what I think is all the combinations but it doesn't accept it I Setup the balancer as follows Then I try to setup the certificate Then you can see it tells me it's invalid. In case it helps I exported from IIS and

Install Wildcard Certificate onto AWS EC2 Load Balancer

♀尐吖头ヾ 提交于 2021-02-06 01:46:31
问题 I'm having trouble. I followed a guide that I found here http://www.thenetworkadministrator.net/index.php/2011/12/iis-ssl-certificate-into-amazon-elastic-load-balancer/ And exported by cert and created all those files, but it doesn't tell you which file goes in which field. I tried what I think is all the combinations but it doesn't accept it I Setup the balancer as follows Then I try to setup the certificate Then you can see it tells me it's invalid. In case it helps I exported from IIS and

Git 常见问题汇总

不问归期 提交于 2021-02-06 01:21:12
Your branch is ahead of 'origin/master' by 1 commit 原因在于你的本地分支高于远程仓库一次提交, 解决方式: -- 同步更新 git push origin master warning: LF will be replaced by CRLF in main.lua The file will have its original line endings in your working directory. 原因在于: CR代表回车(\r) LF代表换行(\n) ,在Dos\Windows平台下使用 CRLF 结束一行,即\r\n ; 在Max\Linux平台下是用 LF 结束一行,即\n 如果Mac和Windows平台下代码的更新以及提交,就会出现问题,其解决方式: -- 检出时将LF转换为CRLF, 提交时将CRLF转换为LF(windows推荐) $ git config --global core.autocrlf true -- 提交时转换为LF,检出时不转换(Unix推荐) $ git config --global core.autocrlf input -- 提交检出均不转换(没有跨平台那一说) $ git config --global core.autocrlf false 更多参考: https: //www

Can't open config file: /usr/local/ssl/openssl.cnf on Windows [duplicate]

℡╲_俬逩灬. 提交于 2021-02-05 12:39:14
问题 This question already has answers here : Unable to load config info from /usr/local/ssl/openssl.cnf on Windows (14 answers) Closed 4 years ago . I have installed OpenSSL 64. I want to use a certificate for my nodejs https server. I ran the following command: openssl genrsa -out subdomain.domain.com.key 1024 But I have got the error: WARNING: can't open config file: /usr/local/ssl/openssl.cnf Loading 'screen' into random state - done Generating RSA private key, 1024 bit long modulus .........+

Can't open config file: /usr/local/ssl/openssl.cnf on Windows [duplicate]

喜夏-厌秋 提交于 2021-02-05 12:37:20
问题 This question already has answers here : Unable to load config info from /usr/local/ssl/openssl.cnf on Windows (14 answers) Closed 4 years ago . I have installed OpenSSL 64. I want to use a certificate for my nodejs https server. I ran the following command: openssl genrsa -out subdomain.domain.com.key 1024 But I have got the error: WARNING: can't open config file: /usr/local/ssl/openssl.cnf Loading 'screen' into random state - done Generating RSA private key, 1024 bit long modulus .........+

Does a CSR need to be signed with the matching private key?

大兔子大兔子 提交于 2021-02-05 11:14:29
问题 When generate a CSR using OpenSSL you have two options: 1) Generate a Private key when the CSR is generated 2) Use the private key to derive a public key and use the public key to create the CSR Does the CSR need to be signed with the matching private key for the CA to validate it? Hypothetically, what if i have TWO key pairs (PubKey1, PrivKey1, PubKey2, PrivKey2). First thing i do is move PrivKey1 to another place. Is there a way where I can use PubKey1 to make the CSR (Without access to