Quantcast
Channel: Media Foundation Development for Windows Desktop forum
Viewing all articles
Browse latest Browse all 1079

Help regarding OPM( Output Protection Manager ). Need some content regarding OPM and some samples or code related other than the example code.

$
0
0

I am new to visual c++ and does not find something useful related OPM(Output protection manager) to use it in my project in Visual C++.

Anyone there to help me in finding the samples or code regarding OPM. 

I am making a dll of it so please help me by giving your precious suggestions.

i have this code to start but i dont know where to implement it and with what project i have to use with. either directx or windows sdk.

-----------------------------------------------------------------------------------------

OPM_RANDOM_NUMBER random; // Random number from driver.

ZeroMemory(&random, sizeof(random)); BYTE *pbCertificate = NULL; // Pointer to a buffer to hold the certificate. ULONG cbCertificate = 0; // Size of the certificate in bytes. PUBLIC_KEY_VALUES *pKey = NULL; // The driver's public key.// Get the driver's certificate chain + random number hr = pVideoOutput->StartInitialization(&random, &pbCertificate, &cbCertificate );if (FAILED(hr)) {goto done; }// Validate the X.509 certificate. (Not shown.) hr = ValidateX509Certificate(pbCertificate, cbCertificate);if (FAILED(hr)) {goto done; }// Get the public key from the certificate. (Not shown.) hr = GetPublicKeyFromCertificate( pbCertificate, cbCertificate,&pKey );if (FAILED(hr)) {goto done; }// Load and initialize a CNG provider (Cryptography API: Next Generation) BCRYPT_ALG_HANDLE hAlg = 0; hr = BCryptOpenAlgorithmProvider( &hAlg, BCRYPT_RSA_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0 );if (FAILED(hr)) {goto done; }// Import the public key into the CNG provider. BCRYPT_KEY_HANDLE hPublicKey = 0; // Import the RSA public key. hr = ImportRsaPublicKey(hAlg, pKey, &hPublicKey);if (FAILED(hr)) {goto done; }

--------------------------------------------------------- I dont know how to use it and where to use it. It says need driver for it to work.


Viewing all articles
Browse latest Browse all 1079

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>