Class KeyType.CertUtils
java.lang.Object
net.schmizz.sshj.common.KeyType.CertUtils
- Enclosing class:
KeyType
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanmatchPattern(String target, String pattern) This method must work exactly as match_pattern from match.c of OpenSSH.static StringverifyHostCertificate(byte[] certRaw, Certificate<?> cert, String hostname)
-
Field Details
-
ALL_SIGNATURES
-
-
Constructor Details
-
CertUtils
public CertUtils()
-
-
Method Details
-
verifyHostCertificate
public static String verifyHostCertificate(byte[] certRaw, Certificate<?> cert, String hostname) throws Buffer.BufferException, SSHRuntimeException - Parameters:
certRaw- Already serialized host certificate that was received as a packet. Can be restored simply by callingnew Buffer.PlainBuffer().putPublicKey(cert)cert- A key with a certificate received from a server.hostname- A hostname of the server. It is juxtaposed to the principals of the certificate.- Returns:
- null if the certificate is valid, an error message if it is not valid.
- Throws:
Buffer.BufferException- If something fromcertRaworcertcan't be parsed.SSHRuntimeException
-
matchPattern
-