[ https://issues.apache.org/jira/browse/SSHD-1166?focusedWorklogId=603430&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-603430 ]
ASF GitHub Bot logged work on SSHD-1166: ---------------------------------------- Author: ASF GitHub Bot Created on: 28/May/21 08:21 Start Date: 28/May/21 08:21 Worklog Time Spent: 10m Work Description: tomaswolf commented on a change in pull request #198: URL: https://github.com/apache/mina-sshd/pull/198#discussion_r641363368 ########## File path: sshd-common/src/main/java/org/apache/sshd/common/config/keys/OpenSshCertificate.java ########## @@ -91,7 +104,83 @@ */ static boolean isValidNow(OpenSshCertificate cert) { long now = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()); - return Long.compareUnsigned(cert.getValidAfter(), now) <= 0 - && Long.compareUnsigned(now, cert.getValidBefore()) < 0; + return Long.compareUnsigned(cert.getValidAfterEpochSeconds(), now) <= 0 + && Long.compareUnsigned(now, cert.getValidBeforeEpochSeconds()) < 0; + } + + /** + * According to <A HREF= + * "https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys#L222-L262">PROTOCOL.certkeys</A>: + * + * Critical Options is a set of bytes that is + * + * [overall length][name(string)][data(string)]... + * + * Where each Critical Option is encoded as a name (string) and data (string) + * + * Then the entire name + data strings are added as bytes (which will get a length prefix) + */ + class CriticalOption { Review comment: This is used for both getCriticalOptions() and for getExtensions(). Extensions are not critical options. I'd rename this to just "Options" or "CertificateOption" or some such. -- 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: 603430) Time Spent: 50m (was: 40m) > 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: 50m > 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