mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-07 07:40:55 +03:00
- Some more indentation fixes
This commit is contained in:
@@ -70,7 +70,7 @@ public enum KeyType {
|
|||||||
protected void writePubKeyContentsIntoBuffer(PublicKey pk, Buffer<?> buf) {
|
protected void writePubKeyContentsIntoBuffer(PublicKey pk, Buffer<?> buf) {
|
||||||
final RSAPublicKey rsaKey = (RSAPublicKey) pk;
|
final RSAPublicKey rsaKey = (RSAPublicKey) pk;
|
||||||
buf.putMPInt(rsaKey.getPublicExponent()) // e
|
buf.putMPInt(rsaKey.getPublicExponent()) // e
|
||||||
.putMPInt(rsaKey.getModulus()); // n
|
.putMPInt(rsaKey.getModulus()); // n
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -101,9 +101,9 @@ public enum KeyType {
|
|||||||
protected void writePubKeyContentsIntoBuffer(PublicKey pk, Buffer<?> buf) {
|
protected void writePubKeyContentsIntoBuffer(PublicKey pk, Buffer<?> buf) {
|
||||||
final DSAPublicKey dsaKey = (DSAPublicKey) pk;
|
final DSAPublicKey dsaKey = (DSAPublicKey) pk;
|
||||||
buf.putMPInt(dsaKey.getParams().getP()) // p
|
buf.putMPInt(dsaKey.getParams().getP()) // p
|
||||||
.putMPInt(dsaKey.getParams().getQ()) // q
|
.putMPInt(dsaKey.getParams().getQ()) // q
|
||||||
.putMPInt(dsaKey.getParams().getG()) // g
|
.putMPInt(dsaKey.getParams().getG()) // g
|
||||||
.putMPInt(dsaKey.getY()); // y
|
.putMPInt(dsaKey.getY()); // y
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -189,7 +189,7 @@ public enum KeyType {
|
|||||||
sType,
|
sType,
|
||||||
keyLen,
|
keyLen,
|
||||||
Arrays.toString(p))
|
Arrays.toString(p))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
EdDSANamedCurveSpec ed25519 = EdDSANamedCurveTable.getByName(EdDSANamedCurveTable.CURVE_ED25519_SHA512);
|
EdDSANamedCurveSpec ed25519 = EdDSANamedCurveTable.getByName(EdDSANamedCurveTable.CURVE_ED25519_SHA512);
|
||||||
@@ -343,16 +343,16 @@ public enum KeyType {
|
|||||||
buf.putBytes(certificate.getNonce());
|
buf.putBytes(certificate.getNonce());
|
||||||
innerKeyType.writePubKeyContentsIntoBuffer(certificate.getKey(), buf);
|
innerKeyType.writePubKeyContentsIntoBuffer(certificate.getKey(), buf);
|
||||||
buf.putUInt64(certificate.getSerial())
|
buf.putUInt64(certificate.getSerial())
|
||||||
.putUInt32(certificate.getType())
|
.putUInt32(certificate.getType())
|
||||||
.putString(certificate.getId())
|
.putString(certificate.getId())
|
||||||
.putBytes(packList(certificate.getValidPrincipals()))
|
.putBytes(packList(certificate.getValidPrincipals()))
|
||||||
.putUInt64(epochFromDate(certificate.getValidAfter()))
|
.putUInt64(epochFromDate(certificate.getValidAfter()))
|
||||||
.putUInt64(epochFromDate(certificate.getValidBefore()))
|
.putUInt64(epochFromDate(certificate.getValidBefore()))
|
||||||
.putBytes(packMap(certificate.getCritOptions()))
|
.putBytes(packMap(certificate.getCritOptions()))
|
||||||
.putBytes(packMap(certificate.getExtensions()))
|
.putBytes(packMap(certificate.getExtensions()))
|
||||||
.putString("") // reserved
|
.putString("") // reserved
|
||||||
.putBytes(certificate.getSignatureKey())
|
.putBytes(certificate.getSignatureKey())
|
||||||
.putBytes(certificate.getSignature());
|
.putBytes(certificate.getSignature());
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean isCertificateOfType(Key key, KeyType innerKeyType) {
|
static boolean isCertificateOfType(Key key, KeyType innerKeyType) {
|
||||||
|
|||||||
Reference in New Issue
Block a user