XpsDigSigPartAlteringRestrictions 열거형

정의

디지털 서명의 범위에서 제외되는 XPS Package의 파트를 지정합니다.

이 열거형은 멤버 값의 비트 조합을 지원합니다.

public enum class XpsDigSigPartAlteringRestrictions
[System.Flags]
public enum XpsDigSigPartAlteringRestrictions
[<System.Flags>]
type XpsDigSigPartAlteringRestrictions = 
Public Enum XpsDigSigPartAlteringRestrictions
상속
XpsDigSigPartAlteringRestrictions
특성

필드

Annotations 2

Annotations 파트는 제외됩니다.

CoreMetadata 1

Core Properties 파트는 제외됩니다.

None 0

제외되는 파트가 없습니다.

SignatureOrigin 4

Signature Origin 파트는 제외됩니다.

예제

다음 예제에서는 이 열거형을 사용하여 XPS 문서에 디지털 서명하는 방법을 보여 줍니다.


// ------------------------------ SignXps -----------------------------
/// <summary>
///   Signs an XPS document with a given X509 certificate, and if one
///   exists, associates the signature with a given SignatureDefintion
///   spotId GUID.</summary>
/// <param name="xpsDocument">
///   The XPS document to sign.</param>
/// <param name="cert">
///   The X509 certificate to use for signing.</param>
/// <param name="spotId">
///   The nullable spotId GUID of the signature definition.</param>
public void SignXps(
    XpsDocument xpsDocument, X509Certificate cert, Guid? spotId )
{
    // If there's a SignatureDefinition spotId,
    // associate it with the signature.
    if (spotId != null)
    {
        xpsDocument.SignDigitally(
            cert, true, XpsDigSigPartAlteringRestrictions.None,
            spotId.Value);
    }
    else
    {
        xpsDocument.SignDigitally(
            cert, true, XpsDigSigPartAlteringRestrictions.None);
    }
}// end:SignXps()

' ------------------------------ SignXps -----------------------------
''' <summary>
'''   Signs an XPS document with a given X509 certificate, and if one
'''   exists, associates the signature with a given SignatureDefintion
'''   spotId GUID.</summary>
''' <param name="xpsDocument">
'''   The XPS document to sign.</param>
''' <param name="cert">
'''   The X509 certificate to use for signing.</param>
''' <param name="spotId">
'''   The nullable spotId GUID of the signature definition.</param>
Public Sub SignXps(xpsDocument As XpsDocument, cert As X509Certificate, spotId? As Guid)
    ' If there's a SignatureDefinition spotId,
    ' associate it with the signature.
    If spotId IsNot Nothing Then
        xpsDocument.SignDigitally(cert, True, XpsDigSigPartAlteringRestrictions.None, spotId.Value)
    Else
        xpsDocument.SignDigitally(cert, True, XpsDigSigPartAlteringRestrictions.None)
    End If

End Sub

설명

이 열거형 멤버 값의 비트 조합을 허용 하는 FlagsAttribute에 있습니다.

디지털 서명에서 제외 되도록 지정 되는 부분 서명을 무효화 하지 않고 수정할 수 있습니다. 예를 들어 문서를 두 명 이상이 서명한 경우 SignatureOrigin 파트를 문서에 처음 서명할 때 서명에서 제외할 수 해야 합니다. (제외는 에 대한 restrictions 호출 SignDigitally의 매개 변수에 지정됩니다.) SignatureOrigin 부분이 제외되지 않으면 추가 서명이 있으면 첫 번째 서명자의 서명이 무효화됩니다.

디지털 서명에 대한 자세한 내용은 Open Packaging Conventions의 디지털 서명 프레임워크를 참조하세요.

Signature Origin 파트 핵심 속성에 대 한 자세한 내용은의 3 장 참조를 Open Packaging Conventions 사양에서 다운로드할 수 있습니다 https://www.ecma-international.org/publications-and-standards/standards/ecma-376/합니다.

적용 대상

추가 정보