为您找到相关结果103,614个
如何通过Python3和ssl实现加密通信功能_python_脚本之家
context.load_cert_chain('cert/server.crt', 'cert/server_rsa_private.pem.unsecure') # 监听端口 with socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) as sock: sock.bind(('127.0.0.1', 9443)) sock.listen(5) #将socket打包成SSL socket with context.wrap_socket(sock, server_side=True)...
www.jb51.net/article/1861...htm 2025-3-22
Ubuntu系统搭建django+nginx+uwsgi的教程详解_unix linux_脚本之家
1 2 export WORKON_HOME=$HOME/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh•source ~/.bashrc3.安装git:sudo apt install git4.为了方便XShell或者CRT连接服务器,建议安装OpenSSH:1 2 sudo apt install openssh-server openssh-client service ssh restart...
www.jb51.net/article/1608...htm 2025-3-24
配置Linux使用LDAP用户认证的方法_Linux_脚本之家
olcTLSCertificateFile: /etc/openldap/certs/server.crt olcTLSCertificateKeyFile: /etc/openldap/certs/server.key olcTLSCACertificateFile: /etc/openldap/cacerts/cacert.pem dn: cn=schema,cn=config objectClass: olcSchemaConfig cn: schema include: file:///etc/openldap/schema/core.ldif include: file...
www.jb51.net/article/1712...htm 2025-3-20
python 请求服务器的实现代码(http请求和https请求)_python_脚本之家
备注:其中 ssl.wrap_socket(s,cert_reqs=ssl.CERT_REQUIRED,ca_certs = 'server_cert.pem') 的ca_certs就是需要在客户端指定的证书,这个是服务器给的公钥证书。证书的格式:一般有der格式、pem格式,且格式不能单纯通过后缀名去进行判定,比如一个后缀名是crt,就认为其不是pem的格式是错误的。
www.jb51.net/article/1408...htm 2025-3-23
深入了解C语言字符函数和字符串函数_C 语言_脚本之家
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> #include <string.h> int main() { char a[] = "abcdefg"; printf("%d\n", strlen(a)); printf("%d\n", sizeof(a));//一个字符所占空间为一个字节 printf("%d\n", (sizeof(a) / sizeof(a[0]))); return 0; } 运行结果: ...
www.jb51.net/article/2184...htm 2025-3-21
Go 加密解密算法小结_Golang_脚本之家
CRT模式 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 package main import ( "bytes" "crypto/aes" "crypto/cipher" "fmt" ) //加密 func aesCtrCrypt(plainText []byte, key []byte) ([]byte, error...
www.jb51.net/article/2351...htm 2025-3-15
阿里云申请的 CA Wosin 证书,在Windows iis下导入证书的步骤分享_服 ...
openssl pkcs12 -export -out server.pfx -inkey server.key -in server.crt 注意, server.crt , 我们下载的并没有用这个文件. 查了一些, 可以把pem后缀改为 crt 文件即可. 然后就是安装openssl了. 比较复杂. 1. 下载安装Perlhttp://www.activestate.com/activeperl/downloads/ ...
www.jb51.net/article/1086...htm 2025-3-21
Android 安全加密:Https编程详解_Android_脚本之家
InputStream caInput = new BufferedInputStream(new FileInputStream("load-der.crt")); Certificate ca; try { ca = cf.generateCertificate(caInput); System.out.println("ca=" + ((X509Certificate) ca).getSubjectDN()); } finally { caInput.close(); } String keyStoreType = KeyStore.getDefaultTy...
www.jb51.net/article/925...htm 2025-3-25