Skip to main content
Cloud Volumes ONTAP
所有雲端供應商
  • Amazon Web Services
  • Google Cloud
  • Microsoft Azure
  • 所有雲端供應商
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

驗證適用於 Linux 上 Cloud Volumes ONTAP 的 Azure 市場映像簽名

貢獻者 netapp-manini netapp-driley

在 Linux 上驗證匯出的 VHD 檔案簽章包括驗證信任鏈、編輯檔案和驗證簽章。

步驟
  1. 從下載 Azure 映像檔 "NetApp 支援網站"並提取摘要(.sig)文件、公鑰證書(.pem)文件和鏈證書(.pem)文件。

    如需詳細資訊、請參閱 "下載 Azure 映像摘要文件"

  2. 驗證信任鏈結。

    % openssl verify -CAfile Certificate-Chain-9.15.0P1_azure.pem Certificate-9.15.0P1_azure.pem
    Certificate-9.15.0P1_azure.pem: OK
  3. 刪除 VHD 檔案開頭的 1 MB(1,048,576 位元組)和結尾的 512 位元組。使用 tail , 這 -c +K`選項從檔案的第 K 個位元組開始產生位元組。因此,它將 1048577 傳遞給 `tail -c

    % tail -c +1048577 ./9150.01000024.05090105.vhd > ./sign.tmp.tail
    % head -c -512 ./sign.tmp.tail > sign.tmp
    % rm ./sign.tmp.tail
  4. 使用 OpenSSL 從憑證中提取公鑰,並使用簽署檔案和公鑰驗證剝離的檔案(sign.tmp)。

    命令提示字元根據驗證結果顯示指示成功或失敗的訊息。

    % openssl x509 -pubkey -noout -in ./Certificate-9.15.0P1_azure.pem > ./Code-Sign-Cert-Public-key.pub
    
    % openssl dgst -verify Code-Sign-Cert-Public-key.pub -keyform PEM -sha256 -signature digest.sig -binary ./sign.tmp
    Verification OK
    
    % openssl dgst -verify Code-Sign-Cert-Public-key.pub -keyform PEM -sha256 -signature digest.sig -binary ./another_file_from_nowhere.tmp
    Verification Failure
  5. 清理工作區。

    % rm ./9150.01000024.05090105.vhd ./sign.tmp
    % rm *.sig *.pub *.pem