CertContext: method to retrieve time when added to store#7
CertContext: method to retrieve time when added to store#7ancwrd1 merged 1 commit intorustls:devfrom
Conversation
a324fe0 to
1694326
Compare
src/cert.rs
Outdated
| /// Returns the time when the certificate was added to the store. | ||
| /// | ||
| /// `None` if the property is not set. | ||
| pub fn property_date_stamp(&self) -> Result<Option<time::UtcDateTime>> { |
There was a problem hiding this comment.
Can it be unit-tested, e.g. with the pkcs12 file?
There was a problem hiding this comment.
I am not sure, aren't those properties part of the context of the win store?
There was a problem hiding this comment.
I don't know, that's why I am asking :) But AI says that it's specific to the certstore indeed. A possible unit test could be to create a temporary entry in the user store, and then delete it after test.
There was a problem hiding this comment.
this would go beyond the scope of a Unit Test maybe? it's more like an integration test considering the impact on the external system dependency.
Also take into account that's not trivial: the library does not allow to set the property (yet) and creation of store, build, and add certificate
There was a problem hiding this comment.
But if it was manually tested, I think it's enough for now.
There was a problem hiding this comment.
Ok, let's skip the test for it.
There was a problem hiding this comment.
To be honest, I am not a Windows guy :)
I use Linux, and develop on Linux.
But I made a check on a Windows laptop in order to develop the feature, and when the property was set on a certificate store of mine, I get the info as expected
1694326 to
891f4f2
Compare
891f4f2 to
e9b1762
Compare
If out of the scope of this crate, feel free to close this PR