SignerInfo.ComputeCounterSignature 方法

定義

建立副署並將簽章加入至 CMS/PKCS #7 訊息。

多載

ComputeCounterSignature()
已淘汰.

ComputeCounterSignature() 方法,提示使用者選取簽章憑證、建立副署,以及將簽章加入至 CMS/PKCS #7 訊息。 限制副屬為一個層級。

ComputeCounterSignature(CmsSigner)

ComputeCounterSignature(CmsSigner) 方法使用指定的簽署人建立副署,並將簽章加入至 CMS/PKCS #7 訊息。 限制副屬為一個層級。

ComputeCounterSignature()

來源:
SignerInfo.cs
來源:
SignerInfo.cs
來源:
SignerInfo.cs

警告

ComputeCounterSignature without specifying a CmsSigner is obsolete and is not supported. Use the overload that accepts a CmsSigner.

ComputeCounterSignature() 方法,提示使用者選取簽章憑證、建立副署,以及將簽章加入至 CMS/PKCS #7 訊息。 限制副屬為一個層級。

public:
 void ComputeCounterSignature();
public void ComputeCounterSignature ();
[System.Obsolete("ComputeCounterSignature without specifying a CmsSigner is obsolete and is not supported. Use the overload that accepts a CmsSigner.", DiagnosticId="SYSLIB0035", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public void ComputeCounterSignature ();
member this.ComputeCounterSignature : unit -> unit
[<System.Obsolete("ComputeCounterSignature without specifying a CmsSigner is obsolete and is not supported. Use the overload that accepts a CmsSigner.", DiagnosticId="SYSLIB0035", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.ComputeCounterSignature : unit -> unit
Public Sub ComputeCounterSignature ()
屬性

例外狀況

Null 參考已傳遞至不接受它做為有效引數的方法。

密碼編譯作業無法完成。

備註

此 CMS/PKCS #7 的實作僅支援一個層級的計數器簽署。 也就是說,簽章可以簽署,這會形成計數器簽署,但無法再次簽署計數器簽署。

這個方法會顯示您為此訊息選擇簽署者的使用者介面。 這需要目前的行程以 使用者互動模式執行,這表示 Environment.UserInteractive 屬性設定為 true。 進程通常處於用戶互動模式,除非它是服務進程或在 Web 應用程式內執行。

憑證符合下列條件的簽署者會顯示在清單中:

  • 憑證具有相關聯的私鑰。
  • 憑證在其有效期間內。
  • 憑證沒有金鑰使用方式,或支援數位簽名或不可否認性金鑰的密鑰使用方式。

從我的存放區選擇簽署者憑證。

需要下列許可權,才能在 .NET Framework 上顯示使用者介面:

需要下列許可權才能存取 .NET Framework 上的簽章金鑰:

適用於

ComputeCounterSignature(CmsSigner)

來源:
SignerInfo.cs
來源:
SignerInfo.cs
來源:
SignerInfo.cs

ComputeCounterSignature(CmsSigner) 方法使用指定的簽署人建立副署,並將簽章加入至 CMS/PKCS #7 訊息。 限制副屬為一個層級。

public:
 void ComputeCounterSignature(System::Security::Cryptography::Pkcs::CmsSigner ^ signer);
public void ComputeCounterSignature (System.Security.Cryptography.Pkcs.CmsSigner signer);
member this.ComputeCounterSignature : System.Security.Cryptography.Pkcs.CmsSigner -> unit
Public Sub ComputeCounterSignature (signer As CmsSigner)

參數

signer
CmsSigner

CmsSigner 物件,表示副簽署人。

例外狀況

Null 參考已傳遞至不接受它做為有效引數的方法。

密碼編譯作業無法完成。

備註

此 CMS/PKCS #7 的實作僅支援一個層級的計數器簽署。 也就是說,簽章可以簽署,這會形成計數器簽署,但無法再次簽署計數器簽署。

需要下列許可權才能存取 .NET Framework 上的簽章金鑰:

適用於