Skip to main content
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

產生並安裝CA簽署的伺服器憑證總覽

貢獻者

在正式作業系統上、最佳做法是安裝CA簽署的數位憑證、以用於將叢集或SVM驗證為SSL伺服器。您可以使用 security certificate generate-csr 產生憑證簽署要求( CSR )的命令、以及 security certificate install 命令來安裝您從憑證授權單位收到的憑證。

產生憑證簽署要求

您可以使用 security certificate generate-csr 產生憑證簽署要求( CSR )的命令。在處理您的要求之後、憑證授權單位(CA)會傳送簽署的數位憑證給您。

開始之前

您必須是叢集或SVM管理員、才能執行此工作。

步驟
  1. 產生CSR:

    security certificate generate-csr -common-name FQDN_or_common_name -size 512|1024|1536|2048 -country country -state state -locality locality -organization organization -unit unit -email-addr email_of_contact -hash-function SHA1|SHA256|MD5

    下列命令會建立 CSR 、其中含有由「 IT 」部門的「 Software 」群組所產生的 2048 位元私密金鑰、其自訂一般名稱為「 erver1.companyname.com`" 」、位於美國加州桑尼維爾。SVM 聯絡管理員的電子郵件地址為「 web@example.com 」。系統會在輸出中顯示CSR和私密金鑰。

    建立 CSR 的範例
    cluster1::>security certificate generate-csr -common-name server1.companyname.com -size 2048 -country US -state California -locality Sunnyvale -organization IT -unit Software -email-addr web@example.com -hash-function SHA256
    
    Certificate Signing Request :
    -----BEGIN CERTIFICATE REQUEST-----
    MIIBGjCBxQIBADBgMRQwEgYDVQQDEwtleGFtcGxlLmNvbTELMAkGA1UEBhMCVVMx
    CTAHBgNVBAgTADEJMAcGA1UEBxMAMQkwBwYDVQQKEwAxCTAHBgNVBAsTADEPMA0G
    CSqGSIb3DQEJARYAMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAPXFanNoJApT1nzS
    xOcxixqImRRGZCR7tVmTYyqPSuTvfhVtwDJbmXuj6U3a1woUsb13wfEvQnHVFNci
    2ninsJ8CAwEAAaAAMA0GCSqGSIb3DQEBCwUAA0EA6EagLfso5+4g+ejiRKKTUPQO
    UqOUEoKuvxhOvPC2w7b//fNSFsFHvXloqEOhYECn/NX9h8mbphCoM5YZ4OfnKw==
    -----END CERTIFICATE REQUEST-----
    
    
    Private Key :
    -----BEGIN RSA PRIVATE KEY-----
    MIIBOwIBAAJBAPXFanNoJApT1nzSxOcxixqImRRGZCR7tVmTYyqPSuTvfhVtwDJb
    mXuj6U3a1woUsb13wfEvQnHVFNci2ninsJ8CAwEAAQJAWt2AO+bW3FKezEuIrQlu
    KoMyRYK455wtMk8BrOyJfhYsB20B28eifjJvRWdTOBEav99M7cEzgPv+p5kaZTTM
    gQIhAPsp+j1hrUXSRj979LIJJY0sNez397i7ViFXWQScx/ehAiEA+oDbOooWlVvu
    xj4aitxVBu6ByVckYU8LbsfeRNsZwD8CIQCbZ1/ENvmlJ/P7N9Exj2NCtEYxd0Q5
    cwBZ5NfZeMBpwQIhAPk0KWQSLadGfsKO077itF+h9FGFNHbtuNTrVq4vPW3nAiAA
    peMBQgEv28y2r8D4dkYzxcXmjzJluUSZSZ9c/wS6fA==
    -----END RSA PRIVATE KEY-----
    
    NOTE: Keep a copy of your certificate request and private key for future reference.
  2. 從CSR輸出複製憑證要求、然後以電子形式(例如電子郵件)將其傳送至信任的協力廠商CA進行簽署。

    在處理您的要求之後、CA會將簽署的數位憑證傳送給您。您應該保留一份私密金鑰和CA簽署的數位憑證複本。

安裝CA簽署的伺服器憑證

您可以使用 security certificate install 在 SVM 上安裝 CA 簽署的伺服器憑證的命令。系統會提示您輸入憑證授權單位(CA)根憑證和中繼憑證、以構成伺服器憑證的憑證鏈結。ONTAP

開始之前

您必須是叢集或SVM管理員、才能執行此工作。

步驟
  1. 安裝 CA 簽署的伺服器憑證:

    security certificate install -vserver SVM_name -type certificate_type

    如需完整的命令語法、請參閱 "工作表"

    註

    系統會提示您輸入CA根憑證和中繼憑證、這些憑證構成伺服器憑證的憑證鏈結。ONTAP鏈結從發行伺服器憑證的CA憑證開始、範圍最多可達CA的根憑證。任何遺失的中繼憑證都會導致伺服器憑證安裝失敗。

    下列命令會在 SVM "`engData2` 上安裝 CA 簽署的伺服器憑證和中繼憑證。

    安裝 CA 簽署的伺服器憑證中繼憑證的範例
    cluster1::>security certificate install -vserver engData2 -type server
    Please enter Certificate: Press <Enter> when done
    -----BEGIN CERTIFICATE-----
    MIIB8TCCAZugAwIBAwIBADANBgkqhkiG9w0BAQQFADBfMRMwEQYDVQQDEwpuZXRh
    cHAuY29tMQswCQYDVQQGEwJVUzEJMAcGA1UECBMAMQkwBwYDVQQHEwAxCTAHBgNV
    BAoTADEJMAcGA1UECxMAMQ8wDQYJKoZIhvcNAQkBFgAwHhcNMTAwNDI2MTk0OTI4
    WhcNMTAwNTI2MTk0OTI4WjBfMRMwEQYDVQQDEwpuZXRhcHAuY29tMQswCQYDVQQG
    EwJVUzEJMAcGA1UECBMAMQkwBwYDVQQHEwAxCTAHBgNVBAoTADEJMAcGA1UECxMA
    MQ8wDQYJKoZIhvcNAQkBFgAwXDANBgkqhkiG9w0BAQEFAANLADBIAkEAyXrK2sry
    -----END CERTIFICATE-----
    
    
    Please enter Private Key: Press <Enter> when done
    -----BEGIN RSA PRIVATE KEY-----
    MIIBPAIBAAJBAMl6ytrK8nQj82UsWeHOeT8gk0BPX+Y5MLycsUdXA7hXhumHNpvF
    C61X2G32Sx8VEa1th94tx+vOEzq+UaqHlt0CAwEAAQJBAMZjDWlgmlm3qIr/n8VT
    PFnnZnbVcXVM7OtbUsgPKw+QCCh9dF1jmuQKeDr+wUMWknlDeGrfhILpzfJGHrLJ
    z7UCIQDr8d3gOG71UyX+BbFmo/N0uAKjS2cvUU+Y8a8pDxGLLwIhANqa99SuSl8U
    DiPvdaKTj6+EcGuXfCXz+G0rfgTZK8uzAiEAr1mnrfYC8KwE9k7A0ylRzBLdUwK9
    AvuJDn+/z+H1Bd0CIQDD93P/xpaJETNz53Au49VE5Jba/Jugckrbosd/lSd7nQIg
    aEMAzt6qHHT4mndi8Bo8sDGedG2SKx6Qbn2IpuNZ7rc=
    -----END RSA PRIVATE KEY-----
    
    Do you want to continue entering root and/or intermediate certificates {y|n}: y
    
    Please enter Intermediate Certificate: Press <Enter> when done
    -----BEGIN CERTIFICATE-----
    MIIE+zCCBGSgAwIBAgICAQ0wDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1Zh
    bGlDZXJ0IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIElu
    Yy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24g
    QXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAe
    BgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTA0MDYyOTE3MDYyMFoX
    DTI0MDYyOTE3MDYyMFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBE
    YWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28gRGFkZHkgQ2xhc3MgMiBDZXJ0
    -----END CERTIFICATE-----
    
    
    Do you want to continue entering root and/or intermediate certificates {y|n}: y
    
    Please enter Intermediate Certificate: Press <Enter> when done
    -----BEGIN CERTIFICATE-----
    MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
    IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
    BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
    aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
    9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy
    NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
    azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
    YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
    -----END CERTIFICATE-----
    
    
    Do you want to continue entering root and/or intermediate certificates {y|n}: n
    
    You should keep a copy of the private key and the CA-signed digital certificate for future reference.