I’ve AppGateway setup with SSL-Profile (MTLS). And configured rewrite rule to add custom header to the request X-ARR-AG-Cert with value {var_client_certificate}.
Application is on .net4.
AppGateway documentation states client certificate is in PEM format.
I’m trying to convert the received client cert (as string) in the header X509Certificate2.
byte[] bytes = Convert.FromBase64String(clientCertString);
X509Certificate2 cert = new X509Certificate2(bytes);
But it’s failing complaining non-base64 character.
- How to contract X509Certificate2 in .net4?
- Do I need to do any preprocessing on the received client cert prior to converting from base64 string?
1