c# - x509 and digital signature -
i'm rewriting application can stop using old microsoft.web.services2.security.x509 microsoft.web.services2.dll , start using system.security.cryptography.x509certificates.
there 1 method can't figure out, though:
bool microsoft.web.services2.security.x509.x509certificate.supportsdigitalsignature()
i can't find equivalent in
system.security.cryptography.x509certificates.x509certificate2
.
do need test whether certificate supports digital signature? don't see how cannot...
first of certificate must have private key in order used signing. use x509certificate2.hasprivatekey property check this.
use x509certificate2.extensions
property access key usage extension. 1 of key usages digital signature. looking for.
Comments
Post a Comment