[ 
https://issues.apache.org/jira/browse/SSHD-1166?focusedWorklogId=603639&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-603639
 ]

ASF GitHub Bot logged work on SSHD-1166:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/May/21 17:46
            Start Date: 28/May/21 17:46
    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_r641715721



##########
File path: 
sshd-common/src/main/java/org/apache/sshd/common/config/keys/OpenSshCertificate.java
##########
@@ -52,26 +57,34 @@
     Collection<String> getPrincipals();
 
     /**
-     * Retrieves the time in number of seconds since the {@link 
java.time.Instant#EPOCH} at which this certificate
-     * becomes or became valid.
-     *
-     * @return the number of seconds since the Instant.EPOCH <em>as an 
unsigned 64bit value</em>
-     * @see    {{@link #isValidNow(OpenSshCertificate)}
+     * When null, implies forever
      */
-    long getValidAfter();
+    Instant getValidAfter();
+
+    default long getValidAfterEpochSeconds() {
+        if (getValidAfter() == null) {
+            return VALID_AFTER_FOREVER_EPOCH;
+        }
+        return getValidAfter().getEpochSecond();

Review comment:
       Would you prefer to continue to use Instant and layer on these logical 
constraints, or go back to long's and apply fewer logical constraints (probably 
just a >= 0 check to ensure it's treated as a signed value)?
   
   I would rather continue to use Instant, even with the constraints, it's 
still fine for all practical purposes




-- 
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: 603639)
    Time Spent: 3h  (was: 2h 50m)

> 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: 3h
>  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

Reply via email to