An application uses X509 certificates for data encryption and decryption. The application stores certificates in
the Personal certificates collection of the Current User store. On each computer, each certificate subject isunique.
The application includes a method named LoadCertificate. The LoadCertificate() method includes the following
code. (Line numbers are included for reference only.)
The LoadCertificate() method must load only certificates for which the subject exactly matches the searchValue
parameter value.
You need to ensure that the LoadCertificate() method loads the correct certificates.
Which code segment should you insert at line 06?
A.
Option A
B.
Option B
C.
Option C
D.
Option D
It should be A as the question says it should match exactly the values.
https://developer.xamarin.com/api/field/System.Security.Cryptography.X509Certificates.X509FindType.FindBySubjectName/
FindBySubjectDistinguishedName : the Find method performs a case-insensitive string comparison for the entire distinguished name.
FindBySubjectName : the Find method performs a case-insensitive string comparison using the supplied value. For example, if you pass “MyCert” to the Find method, it will find all certificates with the subject name containing that string, regardless of other subject values.
Correct answer is D
D
The findValue parameter for the Find method must be a string representing the subject distinguished name of the certificate. This is a more specific search than that provided by the FindBySubjectName enumeration value. Using the FindBySubjectDistinguishedName value, the Find method performs a case-insensitive string comparison for the entire distinguished name. Searching by subject name is a less precise search.