<Signature> 元素(ClickOnce 部署)<Signature> element (ClickOnce deployment)

包含對此部署資訊清單進行數位簽章時所需的資訊。Contains the necessary information to digitally sign this deployment manifest.

語法Syntax


      <Signature> 
   XML signature information 
</Signature>

備註Remarks

使用信封簽名來簽署部署資訊清單是選擇性的,但建議使用。Signing a deployment manifest using an envelope signature is optional, but recommended. 如需有關簽署 XML 檔案的詳細資訊,請參閱http://www.w3.org/TR/xmldsig-core/所述的全球資訊網協會建議的「xml 簽章語法和處理」。For more information about signing XML files, see the World Wide Web Consortium Recommendation, "XML-Signature Syntax and Processing," described at http://www.w3.org/TR/xmldsig-core/.

如果您想要簽署資訊清單,則必須提供所有檔案的雜湊。If you want to sign your manifest, hashes must be provided for all files. 無法簽署含有未雜湊之檔案的資訊清單,因為使用者無法確認未雜湊檔案的內容。A manifest with files that are not hashed cannot be signed, because users cannot verify the contents of unhashed files.

範例Example

下列程式碼範例說明 ClickOnceClickOnce 部署中所使用之部署資訊清單中的 Signature 元素。The following code example illustrates a Signature element in a deployment manifest used in a ClickOnceClickOnce deployment.

<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
  <SignedInfo>
    <CanonicalizationMethod Algorithm=
           "http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
    <SignatureMethod Algorithm=
           "http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
    <Reference URI="">
      <Transforms>
        <Transform Algorithm=
           "http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
      </Transforms>
      <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
      <DigestValue>d2z5AE...</DigestValue>
    </Reference>
  </SignedInfo>
  <SignatureValue>
4PHj6SaopoLp...
  </SignatureValue>
  <KeyInfo>
    <X509Data>
      <X509Certificate>
MIIHnTCCBoWgAwIBAgIKJY9+nwAHAAB...
      </X509Certificate>
    </X509Data>
  </KeyInfo>
</Signature>

請參閱See also