 | HttpClientHandlerSetClientCertificateAndKey Method |
Set the SSL/TLS client certificate and private key
The file must contain the certificate and its private key.
It is also recommended to include all certificates of the trust chain.
Namespace: PdfToolsAssembly: PdfTools (in PdfTools.dll) Version: 1.8.0+c1110cafb37403de0188424e1c97e84e318ca892
Syntaxpublic void SetClientCertificateAndKey(
Stream cert,
Stream key,
string password
)
Parameters
- cert Stream
-
The certificate may be in either PEM (.pem, ASCII text) or DER (.cer, binary) form.
- key Stream
-
The encrypted private key of the certificate must be in PEM (ASCII text) form (.pem).
- password String
-
The password required to decrypt the private key.
ExceptionsException | Condition |
---|
PasswordException | The password is invalid. |
CorruptException | The certificate or key cannot be read. |
ArgumentNullException | if cert is . |
ArgumentNullException | if key is . |
See Also