Skip to content
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

Allow to get the target and the certificate path from X509CertPath #374

Merged
merged 1 commit into from
Aug 7, 2017
Merged

Allow to get the target and the certificate path from X509CertPath #374

merged 1 commit into from
Aug 7, 2017

Conversation

AlexITC
Copy link
Contributor

@AlexITC AlexITC commented Aug 4, 2017

Signed-off-by: Alexis Hernandez alexis22229@gmail.com

@sophokles73
Copy link
Contributor

IMHO it would be sufficient to add a getCertPath method to org.eclipse.californium.scandium.auth.X509CertPath. No need to introduce an additional field all along the stack ...

@AlexITC AlexITC changed the title Attach client's certificate chain to CoAP Request Allow to get the target and the certificate path from X509CertPath Aug 6, 2017
@AlexITC
Copy link
Contributor Author

AlexITC commented Aug 6, 2017

@sophokles73 you are right, its quite simpler in this way, I changed all the code, thanks!

*
* @return The path.
*/
public CertPath getPath() { return path; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please put the method body on its own line (like in the the rest of the class)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the method body is already in the same line as the method signature, isn't it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what I mean is:

public CertPath getPath() {
  return path;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, I placed it this way following the style of getName, I'll change it soon, thanks.

/**
* Gets the asserted identity of this certificate path.
*
* @return The subject.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not the subject but the whole certificate

@@ -664,7 +664,7 @@ public Principal getPeerIdentity() {
/**
* Sets the authenticated peer's identity.
*
* @param the identity
* @param peerIdentity the identity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't seem to be related to the other changes.
next time, please create a separate PR for it

Signed-off-by: Alexis Hernandez <alexis22229@gmail.com>
@AlexITC
Copy link
Contributor Author

AlexITC commented Aug 7, 2017

@sophokles73 I just noticed the getName method was not compacted, Intellij was rendering it in as compacted, sorry for that, code was updated. Thanks!

@sophokles73 sophokles73 merged commit eac0212 into eclipse-californium:2.0.x Aug 7, 2017
@AlexITC AlexITC deleted the 2.0.x-attach-cert-path-to-request branch August 7, 2017 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants