Jan 04 2021 08:36 AM
on my web application, I would like to Register one or more virtual printers (https://docs.microsoft.com/fr-fr/graph/universal-print-concept-overview part Extending Universal Print to support pull printing) with the API print/printers/create but I need to add on the body the certificateSigningRequest parameter and i don't understand how to do that
HOW to generate the content and transportKey ?
Jan 21 2021 02:00 PM
Please take a look at the following article and let us know if you need more information:
OEM Universal Print printer registration - Universal Print | Microsoft Docs
Jan 25 2021 10:48 AM
You can do that with dotnet:
// dotnet 5.0
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(2048);
CertificateRequest certificateRequest = new CertificateRequest("CN=My Name", rsa, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
certificateRequest.CertificateExtensions.Add(new X509KeyUsageExtension(X509KeyUsageFlags.DigitalSignature, false));
var Content = Convert.ToBase64String(certificateRequest.CreateSigningRequest());
var TransportKey = Convert.ToBase64String(rsa.ExportRSAPublicKey());
Of course: the usings on top and the code inside some method.