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

pack-priv Class OpenSshKrl

extends ModifiableFileWatcher
Class Inheritance
Imports
java.io.BufferedInputStream, .BufferedReader, .IOException, .InputStream, .InputStreamReader, java.nio.charset.StandardCharsets, java.nio.file.Files, .NoSuchFileException, .Path, java.security.PublicKey, java.util.Arrays, .HashSet, .Set, org.apache.sshd.common.config.keys.OpenSshCertificate, .PublicKeyEntry, org.apache.sshd.common.util.io.ModifiableFileWatcher, org.eclipse.jgit.util.IO

An implementation of an OpenSSH key revocation list (KRL), either a binary KRL or a simple list of public keys.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static record

Field Summary

Modifier and TypeField and Description
private OpenSshKrl.State
Inherited from org.apache.sshd.common.util.io.ModifiableFileWatcher:
optionsSTRICTLY_PROHIBITED_FILE_PERMISSION

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
private boolean
private static OpenSshKrl.State
private synchronized OpenSshKrl.State
private static OpenSshKrl.State
reload(Path path)

Inherited from org.apache.sshd.common.util.io.ModifiableFileWatcher:
checkReloadRequiredexistsgetPathlastModifiedresetReloadAttributessizetoPathResourcetoPathResourcetoStringupdateReloadAttributesvalidateStrictConfigFilePermissions

Field Detail

stateback to summary
private OpenSshKrl.State state

Constructor Detail

OpenSshKrlback to summary
public OpenSshKrl(Path path)

Method Detail

isRevokedback to summary
public boolean isRevoked(PublicKey key) throws IOException
isRevokedback to summary
private boolean isRevoked(OpenSshKrl.State current, PublicKey key)
loadTextKrlback to summary
private static OpenSshKrl.State loadTextKrl(InputStream in) throws IOException
refreshback to summary
private synchronized OpenSshKrl.State refresh() throws IOException
reloadback to summary
private static OpenSshKrl.State reload(Path path) throws IOException
org.eclipse.jgit.internal.signing.ssh back to summary

private final Record OpenSshKrl.State

extends Record
Class Inheritance
Record Components
keys:Set<String> 
krl:OpenSshBinaryKrl 

Field Summary

Modifier and TypeField and Description
private final Set<String>
keys

Record Component accessed by keys().

private final OpenSshBinaryKrl
krl

Record Component accessed by krl().

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object
the reference object with which to compare.
o
)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public Set<String>
keys()

Record Component getter of keys.

public OpenSshBinaryKrl
krl()

Record Component getter of krl.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

keysback to summary
private final Set<String> keys

Record Component accessed by keys().

krlback to summary
private final OpenSshBinaryKrl krl

Record Component accessed by krl().

Constructor Detail

Stateback to summary
private State(Set<String> keys, OpenSshBinaryKrl krl)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this record is equal to the argument; false otherwise.

hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

Returns:int

a hash code value for this record.

keysback to summary
public Set<String> keys()

Record Component getter of keys.

krlback to summary
public OpenSshBinaryKrl krl()

Record Component getter of krl.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

Returns:String

a string representation of the object.