global-cert

This command corresponds to the function on the page of global cert.

Usage: oredge global-cert ACTION [OPTIONS]

ACTION:
    create
    list
    show
    modify
    delete
    help

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --json                             print json format.
    --config                           specify config file, default is ~/.oredge/config.

Create global-cert

This command is used to create a global-cert.

Usage: oredge global-cert create [OPTIONS]

OPTIONS:
    --label string                     label.
    --priv-key-file string             private key pem file.
    --server-cert-file string          server cert pem file.
    --cert-chain-file string           cert chain pem file.
    --ca-cert string                   ca cert.
    --cert-chain string                cert chain.
    --client-verify bool               true or false.
    --server-cert string               server certificate.
    --priv-key string                  private key.

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --json                             print json format.
    --config                           specify config file, default is ~/.oredge/config.

--label "label string"

You can add a label to this global-cert.

--priv-key-file "file"

Private key file.

--priv-key "priv key string"

This is the same as --priv-key-file, but the argument value is the content of private key.

Only one of --priv-key-file and --priv-key can be set.

--server-cert-file "file"

Server cert file.

--server-cert "server cert string"

This is the same as --server-cert-file, but the argument value is the content of server cert.

Only one of --server-cert-file and --server-cert can be set.

--cert-chain-file "file"

Cert chain file.

--cert-chain "cert chain string"

This is the same as --cert-chain-file, but the argument value is the content of cert chain.

Only one of --cert-chain-file and --cert-chain can be set.

--client-verify "true or false"

Weather to do client verify.

This argument is required.

Example

  1. create a global cert.

    # oredge cert create --label test --priv-key-file test.key --server-cert-file test.crt --client-verify false
    ID: 1
    
  2. create a global cert with cert chain

    # oredge cert create --label test --priv-key-file test.key --cert-chain-file chain.crt --client-verify false
    ID: 1
    

List global-cert

This command is used to list global certificates.

Usage: oredge global-cert list [OPTIONS]

OPTIONS:
    --page integer                     page, 1(default).
    --page-size integer                page size, 20(default).

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --json                             print json format.
    --config                           specify config file, default is ~/.oredge/config.

--page <integer>

Specify the page you want to list.

--page-size <integer>

Specify the page size.

Example

# oredge global-cert list
ID     EXPDATE                LABEL    DOMAINS           ENABLED
117    2021-09-17 04:47:41             *.dev.ogura.io    false
121    2021-09-17 04:47:41                               false
123    2021-09-17 04:47:41             test.com          false
135    2021-09-17 04:47:41    test     test.com          false
136    2021-09-17 04:47:41    test     test.com          false

Show global-cert

Show infomation about the global-cert that you specified.

Usage: oredge global-cert show [id] [OPTIONS]

OPTIONS:
    --id integer                       id.

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --json                             print json format.
    --config                           specify config file, default is ~/.oredge/config.

--id "global-cert id"

Specify to which global-cert you want to show the details.

You can specify it in two method

    oredge global-cert show 1

or

    oredge global-cert show --id 1

Example

# oredge global-cert show 136
ID         : 136
EXPDATE    : 2151-06-12 23:23:47
LABEL      :
DOMAINS    : test.com
ENABLED    : false
SERVER CERT: -----BEGIN CERTIFICATE-----
MIICqTCCAhICCQClDm1WkreW4jANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UEBhMC
VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28x
EjAQBgNVBAoMCU9wZW5SZXN0eTESMBAGA1UECwwJT3BlblJlc3R5MREwDwYDVQQD
DAh0ZXN0LmNvbTEgMB4GCSqGSIb3DQEJARYRYWdlbnR6aEBnbWFpbC5jb20wIBcN
MTQwNzIxMDMyMzQ3WhgPMjE1MTA2MTMwMzIzNDdaMIGXMQswCQYDVQQGEwJVUzET
MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzESMBAG
A1UECgwJT3BlblJlc3R5MRIwEAYDVQQLDAlPcGVuUmVzdHkxETAPBgNVBAMMCHRl
c3QuY29tMSAwHgYJKoZIhvcNAQkBFhFhZ2VudHpoQGdtYWlsLmNvbTCBnzANBgkq
hkiG9w0BAQEFAAOBjQAwgYkCgYEA6P18zUvtmaKQK2xePy8ZbFwSyTLw+jW6t9eZ
aiTec8X3ibN9WemrxHzkTRikxP3cAQoITRuZiQvF4Q7DO6wMkz/b0zwfgX5uedGq
047AJP6n/mwlDOjGSNomBLoXQzo7tVe60ikEm3ZyDUqnJPJMt3hImO5XSop4MPMu
Za9WhFcCAwEAATANBgkqhkiG9w0BAQUFAAOBgQA4OBb9bOyWB1//93nSXX1mdENZ
IQeyTK0Dd6My76lnZxnZ4hTWrvvd0b17KLDU6JnS2N5ee3ATVkojPidRLWLIhnh5
0eXrcKalbO2Ce6nShoFvQCQKXN2Txmq2vO/Mud2bHAWwJALg+qi1Iih/gVYB9sct
FLg8zFOzRlYiU+6Mmw==
-----END CERTIFICATE-----

Modify global-cert

Modify the configuration of a global-cert

Usage: oredge cert modify [id] [OPTIONS]

OPTIONS:
    --enabled bool                     true or false.
    --label string                     label.
    --priv-key-file string             private key pem file.
    --server-cert-file string          server cert pem file.
    --cert-chain-file string           cert chain pem file.
    --ca-cert string                   ca cert.
    --cert-chain string                cert chain.
    --client-verify bool               true or false.
    --server-cert string               server certificate.
    --priv-key string                  private key.
    --id integer                       id.

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --json                             print json format.
    --config                           specify config file, default is ~/.oredge/config.

--id "global-cert id"

Specify to which global-cert you want to modify.

You can specify it in two method

    oredge global-cert modify 1

or

    oredge global-cert modify --id 1

--enabled "true or false"

Make the global-cert enable or disable.

--label "label string"

You can add a label to this global-cert.

--priv-key-file "file"

Private key file.

--priv-key "priv key string"

This is the same as --priv-key-file, but the argument value is the content of private key.

Only one of --priv-key-file and --priv-key can be set.

--server-cert-file "file"

Server cert file.

--server-cert "server cert string"

This is the same as --server-cert-file, but the argument value is the content of server cert.

Only one of --server-cert-file and --server-cert can be set.

--cert-chain-file "file"

Cert chain file.

--cert-chain "cert chain string"

This is the same as --cert-chain-file, but the argument value is the content of cert chain.

Only one of --cert-chain-file and --cert-chain can be set.

--client-verify "true or false"

Weather to do client verify.

Example

  1. disable a global-cert.

    # oredge cert modify 1 --enable false
    OK
    
  2. modify private key of a global cert.

    # oredge cert modify 1 --priv-key-file test.key
    OK
    
  3. modify cert chain of a global cert.

    # oredge cert modify 1 --cert-chain-file chain.crt
    OK
    

Delete global-cert

This command is used to delete a global-cert

Usage: oredge global-cert delete [id] [OPTIONS]

OPTIONS:
    --id integer                       id.

GLOBAL OPTIONS:
    --help
    --show-api                         print restful api request.
    --json                             print json format.
    --config                           specify config file, default is ~/.oredge/config.

--id "global-cert id"

Specify to which global-cert you want to delete.

You can specify it in two method

    oredge global-cert delete 1

or

    oredge global-cert delete --id 1

Example

# oredge global-cert delete 1
OK