Top Description Fields Constructors Methods
org.eclipse.jgit.internal.signing.ssh

pack-priv final Class SshCertificateUtils

extends Object
Class Inheritance
Imports
java.security.PublicKey, java.text.MessageFormat, java.time.Instant, org.apache.sshd.common.config.keys.KeyUtils, .OpenSshCertificate, org.apache.sshd.common.signature.BuiltinSignatures, .Signature, org.apache.sshd.common.util.buffer.Buffer, .ByteArrayBuffer, org.eclipse.jgit.annotations.NonNull, org.eclipse.jgit.internal.transport.sshd.SshdText, org.slf4j.Logger, .LoggerFactory

Utility methods for working with OpenSSH certificates.

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static String

Returns:

null if the certificate is valid at the given instant; otherwise a descriptive message
checkExpiration
(OpenSshCertificate certificate, Instant
Instant to check
signatureTime
)

Checks whether a certificate is valid at a given time.

private static byte[]
pack-priv static String

Returns:

null if the certificate is valid; otherwise a descriptive message
verify
(OpenSshCertificate certificate, Instant
Instant to check whether the certificate is valid at that time; maybe null, in which case the valid-time check is skipped.
signatureTime
)

Verifies a certificate: checks that it is a user certificate and has a valid signature, and if a time is given, that the certificate is valid at that time.

pack-priv static String

Returns:

null if the signature is valid; otherwise a descriptive message
verifySignature
(OpenSshCertificate certificate)

Verifies the signature on a certificate.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final Logger LOG

Constructor Detail

SshCertificateUtilsback to summary
pack-priv SshCertificateUtils()

Method Detail

checkExpirationback to summary
pack-priv static String checkExpiration(OpenSshCertificate certificate, Instant signatureTime)

Checks whether a certificate is valid at a given time.

Parameters
certificate:OpenSshCertificate

OpenSshCertificate to check

signatureTime:Instant

Instant to check

Returns:String

null if the certificate is valid at the given instant; otherwise a descriptive message

getBlobback to summary
private static byte[] getBlob(OpenSshCertificate certificate)
verifyback to summary
pack-priv static String verify(OpenSshCertificate certificate, Instant signatureTime)

Verifies a certificate: checks that it is a user certificate and has a valid signature, and if a time is given, that the certificate is valid at that time.

Parameters
certificate:OpenSshCertificate

OpenSshCertificate to verify

signatureTime:Instant

Instant to check whether the certificate is valid at that time; maybe null, in which case the valid-time check is skipped.

Returns:String

null if the certificate is valid; otherwise a descriptive message

verifySignatureback to summary
pack-priv static String verifySignature(OpenSshCertificate certificate)

Verifies the signature on a certificate.

Parameters
certificate:OpenSshCertificate

OpenSshCertificate to verify

Returns:String

null if the signature is valid; otherwise a descriptive message