[ https://issues.apache.org/jira/browse/SSHD-1166?focusedWorklogId=603572&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-603572 ]
ASF GitHub Bot logged work on SSHD-1166: ---------------------------------------- Author: ASF GitHub Bot Created on: 28/May/21 15:35 Start Date: 28/May/21 15:35 Worklog Time Spent: 10m Work Description: alex-sherwin commented on a change in pull request #198: URL: https://github.com/apache/mina-sshd/pull/198#discussion_r641642577 ########## File path: sshd-common/src/main/java/org/apache/sshd/common/config/keys/OpenSshCertificateImpl.java ########## @@ -229,8 +228,81 @@ public String toString() { + "[id=" + getId() + ", serial=" + getSerial() + ", type=" + getType() - + ", validAfter=" + toDate(getValidAfter()) - + ", validBefore=" + toDate(getValidBefore()) + + ", validAfter=" + toStringDate(getValidAfter()) + + ", validBefore=" + toStringDate(getValidBefore()) + "]"; } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + OpenSshCertificateImpl that = (OpenSshCertificateImpl) o; + + if (serial != that.serial) { + return false; + } + if (type != that.type) { + return false; + } + if (keyType != null ? !keyType.equals(that.keyType) : that.keyType != null) { + return false; + } + if (!Arrays.equals(nonce, that.nonce)) { + return false; + } + if (certificatePublicKey != null + ? !certificatePublicKey.equals(that.certificatePublicKey) : that.certificatePublicKey != null) { + return false; + } + if (id != null ? !id.equals(that.id) : that.id != null) { + return false; + } + if (principals != null ? !principals.equals(that.principals) : that.principals != null) { + return false; + } + if (validAfter != null ? !validAfter.equals(that.validAfter) : that.validAfter != null) { + return false; + } + if (validBefore != null ? !validBefore.equals(that.validBefore) : that.validBefore != null) { + return false; + } + if (criticalOptions != null ? !criticalOptions.equals(that.criticalOptions) : that.criticalOptions != null) { + return false; + } + if (extensions != null ? !extensions.equals(that.extensions) : that.extensions != null) { + return false; + } + if (reserved != null ? !reserved.equals(that.reserved) : that.reserved != null) { + return false; + } + if (caPubKey != null ? !caPubKey.equals(that.caPubKey) : that.caPubKey != null) { + return false; + } + return Arrays.equals(signature, that.signature); + } + + @Override + public int hashCode() { Review comment: Removed equals/hashCode entirely from OpenSshCertificateImpl, this was only added to make equality checks in the test case simpler, but I just moved the equality checks to the unit test instead -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 603572) Time Spent: 1h 20m (was: 1h 10m) > Support generating OpenSSH client certificates > ---------------------------------------------- > > Key: SSHD-1166 > URL: https://issues.apache.org/jira/browse/SSHD-1166 > Project: MINA SSHD > Issue Type: New Feature > Reporter: Alex Sherwin > Priority: Major > Time Spent: 1h 20m > Remaining Estimate: 0h > > Support generating OpenSSH client certificates > The OpenSSH certificate spec is defined here: > https://cvsweb.openbsd.org/src/usr.bin/ssh/PROTOCOL.certkeys?annotate=HEAD > MINA already supports using OpenSSH client certs for publickey auth via > SSHD-1161 > This ticket is to support creating/generating OpenSSH client certificates -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org