Package org.xulfactory.gliese.message

Examples of org.xulfactory.gliese.message.UserAuthPublicKeyOk


    signature.initSign(kp.getPrivate());
    final PublicKey publickey = kp.getPublic();
    final SSHPublicKey pkey = new SSHRSAPublicKey(
        ((RSAPublicKey)kp.getPublic()).getModulus(),
        ((RSAPublicKey)kp.getPublic()).getPublicExponent());
    UserAuthPublicKeyOk uapkok = new UserAuthPublicKeyOk();
    uapkok.setAlgorithm("ssh-rsa");
    uapkok.setPubkey(pkey.encode());
    UserAuthSuccessMessage uasm = new UserAuthSuccessMessage();
    when(transport.readMessage("publickey")).thenReturn(uapkok).thenReturn(uasm);
    when(transport.getSessionId()).thenReturn(new byte[20]);
    // When
    AuthenticationResult res = authMgr.authenticate("user", pkey, signature);
View Full Code Here

TOP

Related Classes of org.xulfactory.gliese.message.UserAuthPublicKeyOk

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.