Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/arvintian/sslutil

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/arvintian/sslutil

  • v0.0.0-20201012094929-90679270b191
  • Source
  • Go
  • Socket score

Version published
Created
Source

SSLUtil

SSL证书工具

Install

go get -u github.com/Arvintian/sslutil

Usage

#./bin/sslutil

Usage: sslutil -action [-ca] [-ca-key] -cfg -out -prefix
Options:
  -action string
        the action ca or sign
  -ca string
        ca pem
  -ca-key string
        ca key pem
  -cfg string
        config json file
  -out string
        cert and cert-key output dir, default current dir (default "workdir/sslutil")
  -prefix string
        cert and cert-key filename prefix (default "ca")

参数说明

action

  • ca 生成根证书
  • sign 生成签名证书

ca

  • 生成签名证书必填,根证书cert pem

ca-key

  • 生成签名证书必填,根证书key pem

cfg

  • 证书配置json

out

  • 输出目录

prefix

  • 证书文件前缀

Build

git clone https://github.com/Arvintian/sslutil.git
cd sslutil
make build

Example

生成根证书

./bin/sslutil -action ca -cfg test/ca.json -out pki -prefix ca
cat test/ca.json
{
    "country": [
        "CN"
    ],
    "organization": [
        "k8s"
    ],
    "organizationalUnit": [
        "system-root"
    ],
    "province": [
        "BeiJing"
    ],
    "locality": [
        "BeiJing"
    ],
    "hosts": [
        ""
    ],
    "years": 10
}

生成签名证书

./bin/sslutil -action sign -ca pki/ca-cert.pem -ca-key pki/ca-key.pem -cfg test/server.json -out pki -prefix server
cat test/server.json
{
    "country": [
        "CN"
    ],
    "organization": [
        "k8s"
    ],
    "organizationalUnit": [
        "system-server"
    ],
    "province": [
        "BeiJing"
    ],
    "locality": [
        "BeiJing"
    ],
    "hosts": [
        "127.0.0.1",
        "localhost"
    ],
    "years": 10
}

FAQs

Package last updated on 12 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc