ssl

mysql replication支持ssl,一主一从 +CA服务器

不问归期 提交于 2020-04-17 03:25:39
【推荐阅读】微服务还能火多久?>>> 先检查主机上有没有安装openssl这个软件: rpm -qa |grep openssl 1、将Master服务器自己做成CA服务器 [root @gyf ~]# cd /etc/pki/CA/ [root @gyf CA]# ll total 16 drwxr-xr-x. 2 root root 4096 2月 22 2013 certs 发证的目录 drwxr-xr-x. 2 root root 4096 2月 22 2013 crl 吊销证书的目录 drwxr-xr-x. 2 root root 4096 2月 22 2013 newcerts 发新证的目录 drwx------. 2 root root 4096 2月 24 18:55 private 私钥目录 (1)先给自己生成私钥,必须放在CA目录下的private下 (umask 077;openssl genrsa -out /etc/pki/CA/private/cakey.pem 2048) 使用(),只让umask 077在子shell生效,genrsa一种加密工具 -out 输出文件保存位置 私钥长度 2048 (2)生成 CA 证书请求 为了获取一个 CA 根证书,我们需要先制作一份证书请求。先前生成的 CA 密钥对被用于对证书请求签名。 [root @gyf CA

How do I make a TLS connection using the rustls library?

和自甴很熟 提交于 2020-04-16 05:13:20
问题 The documentation provides an example — unfortunately it does not compile; a lot of stuff got renamed and the interface of the ClientSession constructor changed. I managed to fix the errors to a point where it compiles, but not to a point where it works. Here is my best attempt at getting the minimum example to work: extern crate rustls; use io::Read; use io::Write; use rustls::Session; use std::io; fn main() { let mut socket = std::net::TcpStream::connect("www.google.com:443").unwrap(); let

“Can't connect to HTTPS URL because the SSL module is not available.”

独自空忆成欢 提交于 2020-04-16 04:46:31
问题 Hi guys I having trouble with SSL and python. I had a script that goes to f5 API with requests and it was worked fine. I did another API script. Tried it on another machine (some VPN system I can't provide the name) also with requests package since my python API script with requests package doesn't work. I know the problem started when I tried to approach the other machine's API because the problem I have is on 2 machines. On the other machine I did it on purpose to see if that was my problem

“Can't connect to HTTPS URL because the SSL module is not available.”

帅比萌擦擦* 提交于 2020-04-16 04:46:25
问题 Hi guys I having trouble with SSL and python. I had a script that goes to f5 API with requests and it was worked fine. I did another API script. Tried it on another machine (some VPN system I can't provide the name) also with requests package since my python API script with requests package doesn't work. I know the problem started when I tried to approach the other machine's API because the problem I have is on 2 machines. On the other machine I did it on purpose to see if that was my problem

Send https request in java using .pem file

徘徊边缘 提交于 2020-04-16 02:51:26
问题 I have .pem file containing certificate, private key and trust chain, and .p12 file that I've generated from it using openssl pkcs12 -export: openssl pkcs12 -export -out file.p12 -in file.pem -inkey file.pem -passin pass:password -passout pass:password My PEM file structure: -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY----- -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- ... -----END

Flask-Talisman breaks Flask-Bootstrap

回眸只為那壹抹淺笑 提交于 2020-04-13 18:37:17
问题 I want my website to always redirect to the secure https version of the site, and I'm using flask-talisman to do this. However for some reason adding this seemingly-unrelated line of code is breaking the flask-bootstrap formatting on my website. This is what the original __init__.py file and website looked like before adding flask-talisman : from flask import Flask from config import Config from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_bootstrap import

Flask-Talisman breaks Flask-Bootstrap

落花浮王杯 提交于 2020-04-13 18:37:07
问题 I want my website to always redirect to the secure https version of the site, and I'm using flask-talisman to do this. However for some reason adding this seemingly-unrelated line of code is breaking the flask-bootstrap formatting on my website. This is what the original __init__.py file and website looked like before adding flask-talisman : from flask import Flask from config import Config from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_bootstrap import

Flask-Talisman breaks Flask-Bootstrap

删除回忆录丶 提交于 2020-04-13 18:36:29
问题 I want my website to always redirect to the secure https version of the site, and I'm using flask-talisman to do this. However for some reason adding this seemingly-unrelated line of code is breaking the flask-bootstrap formatting on my website. This is what the original __init__.py file and website looked like before adding flask-talisman : from flask import Flask from config import Config from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_bootstrap import

How to force CURL to ask for http/1.1? Or maybe there's another issue, not sure

两盒软妹~` 提交于 2020-04-12 09:53:49
问题 I've got a piece of code (let's name it Code A) working in a framework and I want to make it work in another framework. The working piece of code makes a successful POST request using CURL like this (request with CURLOPT_VERBOSE on): * Connected to android.clients.google.com (216.58.209.238) port 443 (#0) * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /Applications/MAMP/Library

Extract certificate from SSLContext

别等时光非礼了梦想. 提交于 2020-04-11 04:44:07
问题 I'm creating SSLContext in standard way: take .p12 certificate file, create KeyStore and load certificate into it, create KeyManagerFactory, init it with KeyStore, and get KeyManagers, create TrustManagerFactory, init it with null, and get TrustManagers. create SSLContext and init it with KeyManagers and TrustManagers. The question is - how can I extract KeyStore and certificate data back from SSLContext? The task is to obtain fingerprint hash from certficate. Is it even possible or I have to