1

I have a business requirement to check the digital signature on an Open Packaging Conventions Package (it's a Word document) prior to continuing to process the document. The package is signed by me prior to delivering it to the client, so my code needs to verify at runtime that the file came from me and also has not been altered. I have working code that does this properly:

public static bool VerifySignature(Package package)
{
    bool verified = true;

    PackageDigitalSignatureManager dsm = new PackageDigitalSignatureManager(package);
    VerifyResult verifyResult = dsm.VerifySignatures(false);

    verified &= verifyResult == VerifyResult.Success;

    var signature = dsm.Signatures.Where(s => s.Signer.Subject.Equals("MyCompanyName")).FirstOrDefault();

    verified &= !ReferenceEquals(signature, null) && signature.Signer.Issuer.Equals("NameOfCA");

    return verified;
}

My question relates to what actually happens when PackageDigitalSignatureManager.VerifySignatures() is called. I am concerned that during the certificate validation a CRL check, or some other call outside the network, will be made. I have some clients who run my application on machines with absolutely no internet access. If the code relies on internet access, it's basically a showstopper for me.

I want to know two things:

  1. Will my code lead to a CRL check or something else which could result in a call outside the network?
  2. If so, is there a way to prevent it, or perhaps a different way to validate the signature reliably using a different mechanism?
4

2 に答える 2

0
  1. はい、証明書チェーンを適切に検証するには、OCSP を呼び出す必要があります。一部の標準 (XAdES など) では、OCSP 応答と CRL をドキュメントに埋め込んで自己完結型のパッケージを作成できますが、XAdES の使用は OPC 標準では明示的に定義されていません (言及されています)。ドキュメント内の XAdES データ (つまり、それを使用するか、無視するか、エラー データとして扱うか)。

  2. 検証の完全性を確保するために、OCSP チェックを実行する必要があります。他の検証メカニズム (オフィス文書の署名と暗号化をサポートする SecureBlackbox 製品など) を使用する場合は、(技術的に) この手順をスキップできますが、スキップを省略した場合、セキュリティ侵害の可能性がわずかにあります。

于 2013-08-23T18:43:07.503 に答える