Package net.schmizz.sshj.common
Class KeyType.CertUtils
- java.lang.Object
-
- net.schmizz.sshj.common.KeyType.CertUtils
-
- Enclosing class:
- KeyType
public static class KeyType.CertUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<Factory.Named<Signature>>ALL_SIGNATURES
-
Constructor Summary
Constructors Constructor Description CertUtils()
-
Method Summary
Modifier and Type Method Description static booleanmatchPattern(java.lang.String target, java.lang.String pattern)This method must work exactly as match_pattern from match.c of OpenSSH.static java.lang.StringverifyHostCertificate(byte[] certRaw, Certificate<?> cert, java.lang.String hostname)
-
-
-
Field Detail
-
ALL_SIGNATURES
public static final java.util.List<Factory.Named<Signature>> ALL_SIGNATURES
-
-
Method Detail
-
verifyHostCertificate
public static java.lang.String verifyHostCertificate(byte[] certRaw, Certificate<?> cert, java.lang.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
public static boolean matchPattern(java.lang.String target, java.lang.String pattern)This method must work exactly as match_pattern from match.c of OpenSSH. If it works differently, consider it as a bug that must be fixed.
-
-