Giter Club home page Giter Club logo

ssl_socket_demo's Introduction

ssl_socket_demo

基于OpenSSL工具包实现SSL Client/Server简单安全交互程序

一、关于客户端及服务端程序的编译:

$ make    #编译
$ make clean    #编译清除     

二、涉及到证书及密钥生成方法说明:

1、CA根密钥及证书生成过程:

# 生成根密钥
$ openssl genrsa -des3 -out root.key
# 生成根证书
$ openssl req -new -key root.key -out root.csr
# 根证书自签名
$ openssl x509 -req -days 3650 -sha1 -extensions v3_ca -signkey root.key -in root.csr -out root.crt

2、服务端密钥及证书生成过程:

# 生成服务端密钥
$ openssl genrsa -des3 -out server.key 2048
# 生成服务端证书
$ openssl req -new -key server.key -out server.csr
# 使用根证书及密钥签发服务端子证书
$ openssl x509 -req -days 3650 -sha1 -extensions v3_req -CA root.crt -CAkey root.key -CAcreateserial -in server.csr -out server.crt

3、客户端密钥及证书生成过程:

# 生成客户端密钥
$ openssl genrsa -des3 -out client.key 2048
# 生成客户端证书
$ openssl req -new -key client.key -out client.csr
# 使用根证书及密钥签发客户端子证书
$ openssl x509 -req -days 3650 -sha1 -extensions v3_req -CA root.crt -CAkey root.key -CAcreateserial -in client.csr -out client.crt

合并证书和密钥生成PFX文件:

# PFX格式供客户端安装
$ openssl pkcs12 -export -in client.crt -inkey client.key -out client.pfx

ssl_socket_demo's People

Contributors

erikjiang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ssl_socket_demo's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.