-
Notifications
You must be signed in to change notification settings - Fork 290
Fixing build break in using client_certificate credentials #1018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@msabansal I'm not sure exactly what this fix does. Can you please include a detailed description of the bug being fixed? |
@@ -130,16 +135,17 @@ struct AadTokenResponse { | |||
access_token: String, | |||
} | |||
|
|||
fn get_encoded_cert(cert: &X509) -> Result<String, ClientCertificateCredentialError> { | |||
fn get_encoded_cert(cert: &X509) -> Result<String, azure_core::error::Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fn get_encoded_cert(cert: &X509) -> Result<String, azure_core::error::Error> { | |
fn get_encoded_cert(cert: &X509) -> azure_core::Result<String> { |
@rylev Added the description. I am not sure why the build is passing. If someone can point me to how i can fix the test for this i am happy to do that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to merge this since things are broken on master, but if you have time to do a follow up addressing the comments here, that would be amazing.
@@ -174,7 +180,7 @@ impl TokenCredential for ClientCertificateCredential { | |||
let chain = chain | |||
.into_iter() | |||
.map(|x| get_encoded_cert(&x)) | |||
.collect::<Result<Vec<String>, ClientCertificateCredentialError>>()? | |||
.collect::<Result<Vec<String>, azure_core::error::Error>>()? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.collect::<Result<Vec<String>, azure_core::error::Error>>()? | |
.collect::<azure_core::Result<Vec<String>>>()? |
fn openssl_error() -> azure_core::error::Error { | ||
Error::message(ErrorKind::Credential, "Openssl decode error") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want to use the same error message for all of these errors. It makes it hard to tell what actually went wrong.
The identity SDK doesn't build anymore when trying to build with feature client_certificate. This PR addresses the issue.
Also added a full build on the SDK