1

用于初始化需要获取驱动程序证书链的 COPP 会话。现在我有一个 XML 格式的证书链,如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<c:CertificateCollection xmlns:c="http://schemas.microsoft.com/DRM/2004/02/cert" xmlns="http://www.w3.org/2000/09/xmldsig#" c:Version="2.0">
<c:Certificate>
  <c:Data>
     <c:PublicKey>
        <KeyValue>
           <RSAKeyValue>
              <Modulus>1UwBXelx+u0K4uPpIyNa0h3Xwgm+KQve4xh9dZ7SaU6cv1WPcE09mI34o9Jwbo1VT+HPCBw7ITSYLqDOMYIEGUEQjVmuZB4Ug59mRTLJOz3njHdoYh4bUZydTFY8tZ57U4KKS0izihhqGbuA7hvSVQszrf+utI+ctnZAWxoF6QMuRU3NuLeXXXm10fbsmu33IEudgCEehR4etg7tUYnW6hzT9Yoe7uVVYinMTyumYeDx0gxDLvklqdIAmDUOzLSeR/nsRcMAxYeKlCPVmhfEAiUngmqQQEC3Pt/K+D/y0acdxwuDfpWYt7CPrelU/DCcHwCTMZDL5udsqJMTdd7kQQ==</Modulus>
              <Exponent>AQAB</Exponent>
           </RSAKeyValue>
        </KeyValue>
     </c:PublicKey>
     <c:KeyUsage>
        <c:EncryptKey>1</c:EncryptKey>
     </c:KeyUsage>
     <c:SecurityLevel>2000</c:SecurityLevel>
     <c:ManufacturerData>
        <c:ManufacturerName>NVidia Corporation</c:ManufacturerName>
        <c:ManufacturerURL>http://www.nvidia.com</c:ManufacturerURL>
        <c:ModelName>Graphics Driver</c:ModelName>
        <c:ModelNumber>Version 320.49</c:ModelNumber>
     </c:ManufacturerData>
     <c:Features>
        <c:WMDRMReceiver>1</c:WMDRMReceiver>
        <c:COPPCertificate>1</c:COPPCertificate>
     </c:Features>
  </c:Data>
  <Signature>
     <SignedInfo>
        <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
        <SignatureMethod Algorithm="http://schemas.microsoft.com/DRM/2004/02/CERT/Rsa-sha1" />
        <Reference>
           <Transforms>
              <Transform Algorithm="http://schemas.microsoft.com/DRM/2004/02/CERT/Data" />
              <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
           </Transforms>
           <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
           <DigestValue>ZaHL3l6sO717q3rTyv2WUENZIpE=</DigestValue>
        </Reference>
     </SignedInfo>
      <SignatureValue>dm+EEcA9d1whKF4YIha1CSIVtk3P/E1pOsIVthqzJUivwAeJOIi+k7PB+6MtsjkmsGVRaiIZni36z5gEFaqxX9uXUf1NxA+Dwt0bcIgLnBz6ELoZRkVTuvgEnfxmwqcn2Cg6MM5IPVHPql2Tk0UMbxMMWeDC6mClnEzUNvTkaH8zYPXCX+G6aE6Wh9UUhn/qmwHcFHZLAFXQTzB850T/JaZJgTg4P8+vMEL1VxeNqNDEDzH5YdEYOMS9ruD8lJxDm8j1w2m4VNMUHW3XMwI7Glrr1D1PNRK5pqzkNKcWmuyIcSDW1JW8L/zHWsCHRJ51jJfxsfneEz8IOaLT2E0sKA==</SignatureValue>
     <KeyInfo>
        <KeyValue>
           <RSAKeyValue>
              <Modulus>tyKQLcKT6HzgDDBCqBFyFSbE/VAMCP/9FeaUWbIG/TKPal6woNrSqMmd9ged3SBXaLeX91qdUG10J+DtHevwzxm9iwwb4eMrVBE6W0QXB3xd4XiwvxICsI31X8HOGaSI+0wIgdGLSCySRYyXO+54a/2vpgd7AKxeIp6gW7QlySdstFrOwItc98/PfEX4c6yK0lAgqNoIlw5PKa6qe0I5PlW+wZAoSxDEMMo9GRQtTlvU8gX1k3tT4VyBpp2BzZsbA44AjWiEf0ZHm/b9LcrbvdrPNrVyo5P5djXTuL1zUclducxRa4H9H+aq0TmmHi78Rkaor2eEOZ4Ol47OeNfJEQ==</Modulus>
              <Exponent>AQAB</Exponent>
           </RSAKeyValue>
        </KeyValue>
     </KeyInfo>
  </Signature>
</c:Certificate>
<c:Certificate>
  <c:Data>
     <c:PublicKey>
        <KeyValue>
           <RSAKeyValue>
              <Modulus>tyKQLcKT6HzgDDBCqBFyFSbE/VAMCP/9FeaUWbIG/TKPal6woNrSqMmd9ged3SBXaLeX91qdUG10J+DtHevwzxm9iwwb4eMrVBE6W0QXB3xd4XiwvxICsI31X8HOGaSI+0wIgdGLSCySRYyXO+54a/2vpgd7AKxeIp6gW7QlySdstFrOwItc98/PfEX4c6yK0lAgqNoIlw5PKa6qe0I5PlW+wZAoSxDEMMo9GRQtTlvU8gX1k3tT4VyBpp2BzZsbA44AjWiEf0ZHm/b9LcrbvdrPNrVyo5P5djXTuL1zUclducxRa4H9H+aq0TmmHi78Rkaor2eEOZ4Ol47OeNfJEQ==</Modulus>
              <Exponent>AQAB</Exponent>
           </RSAKeyValue>
        </KeyValue>
     </c:PublicKey>
     <c:KeyUsage>
        <c:SignCertificate>1</c:SignCertificate>
     </c:KeyUsage>
     <c:SecurityLevel>2000</c:SecurityLevel>
     <c:ManufacturerData>
        <c:ManufacturerName>NVidia Corporation</c:ManufacturerName>
        <c:ManufacturerURL>http://www.nvidia.com</c:ManufacturerURL>
     </c:ManufacturerData>
  </c:Data>
  <Signature>
     <SignedInfo>
        <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
        <SignatureMethod Algorithm="http://schemas.microsoft.com/DRM/2004/02/CERT/Rsa-sha1" />
        <Reference>
           <Transforms>
              <Transform Algorithm="http://schemas.microsoft.com/DRM/2004/02/CERT/Data" />
              <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
           </Transforms>
           <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
           <DigestValue>MY4Anb+BiEs3rsY2Rr1hkIEcSXE=</DigestValue>
        </Reference>
     </SignedInfo>
     <SignatureValue>hbM9dDIB6EMxUsvMITDCyDJxoV6J/fD54XmiI8WLO8G7T1hApjzWxqlkxa+Ul0JXwHt70EFKWQe+niXBHR5wzb7Rcr5RCKkxSRepDBDU/1zJD+R6EtzMo0JdPvvrfInuKjOvuXhu7hBQCpOPqSJUNZVT0zWrSIl44+xqI4wRGM0=</SignatureValue>
     <KeyInfo>
        <KeyValue>
           <RSAKeyValue>
              <Modulus>sAMzO56CMzRDa9cif2VfezUAA6e5XkSoyzHabqkIcIYIYEP2h61ukH93js6NDIG0bcGye/TlnxOtdeuKGmO0AOYbgJ7piCe0ZVyNdMn/1DrEflvHoA8YnMfl96/PoLrEwKw7j9FZR1XvjDpUl4mClydY5jrWy8xkNkuRCYh3PJE=</Modulus>
              <Exponent>AQAB</Exponent>
           </RSAKeyValue>
        </KeyValue>
     </KeyInfo>
  </Signature>
</c:Certificate>
<c:Certificate>
  <c:Data>
     <c:PublicKey>
        <KeyValue>
           <RSAKeyValue>
              <Modulus>sAMzO56CMzRDa9cif2VfezUAA6e5XkSoyzHabqkIcIYIYEP2h61ukH93js6NDIG0bcGye/TlnxOtdeuKGmO0AOYbgJ7piCe0ZVyNdMn/1DrEflvHoA8YnMfl96/PoLrEwKw7j9FZR1XvjDpUl4mClydY5jrWy8xkNkuRCYh3PJE=</Modulus>
              <Exponent>AQAB</Exponent>
           </RSAKeyValue>
        </KeyValue>
     </c:PublicKey>
     <c:KeyUsage>
        <c:SignCertificate>1</c:SignCertificate>
     </c:KeyUsage>
     <c:SecurityLevel>3000</c:SecurityLevel>
     <c:ManufacturerData>
        <c:ManufacturerName>Microsoft Corporation</c:ManufacturerName>
        <c:ManufacturerURL>http://www.microsoft.com</c:ManufacturerURL>
     </c:ManufacturerData>
  </c:Data>
  <Signature>
     <SignedInfo>
        <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
        <SignatureMethod Algorithm="http://schemas.microsoft.com/DRM/2004/02/CERT/Rsa-sha1" />
        <Reference>
           <Transforms>
              <Transform Algorithm="http://schemas.microsoft.com/DRM/2004/02/CERT/Data" />
              <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
           </Transforms>
           <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
           <DigestValue>6Oa4ngWiBGCi2UmRjCzkNaiiNUY=</DigestValue>
        </Reference>
     </SignedInfo>
     <SignatureValue>L8ae7IcXOLihq5n0q7T4KYcCuhRlhKU6qa5yy+4bmFS9qr7th2KIvSo6/zKrYTwnvMHuHyZK7Es3lIYCoBuVhr7sPABh7M//5WajfaKyMQpeTC28P3Htsv448o5YYTSXuIdzssY/EbBQ0PpOyf4zxvXZxIbRm8EpCpDm0DZZeIM=</SignatureValue>
     <KeyInfo>
        <KeyValue>
           <RSAKeyValue>
              <Modulus>pjoeWLSTLDonQG8She6QhkYbYott9fPZ8tHdB128ZETcghn5KHoyin7HkJEcPJ0Eg4UdSva0KDIYDjA3EXd69R3CN2Wp/QyOo0ZPYWYp3NXpJ700tKPgIplzo5wVd/69g7j+j8M66W7VNmDwaNs9mDc1p2+VVMsDhOsV/Au6E+E=</Modulus>
              <Exponent>AQAB</Exponent>
           </RSAKeyValue>
        </KeyValue>
     </KeyInfo>
  </Signature>
</c:Certificate>
</c:CertificateCollection>

现在的问题是,我如何在 c# 中加载它?与对象是为了那个?X509Certificate 或类似的东西?

4

1 回答 1

0

要初始化 COPP 会话,您只需要设备证书(链中的第一个)公钥。您可以使用 XML 中提供的模数和指数构造公共。

于 2014-07-14T09:48:39.043 回答