Package rdpclient.ntlmssp.asn1

Examples of rdpclient.ntlmssp.asn1.TSCredentials


        // Length of packet
        ByteBuffer buf = new ByteBuffer(1024, true);

        TSRequest tsRequest = new TSRequest("TSRequest");
        tsRequest.version.value = 2L;
        NegoItem negoItem = new NegoItem("NegoItem");
        negoItem.negoToken.value = negoToken;
        tsRequest.negoTokens.tags = new Tag[] {negoItem};

        tsRequest.writeTag(buf);
View Full Code Here


        // Length of packet
        ByteBuffer buf = new ByteBuffer(4096, true);

        TSRequest tsRequest = new TSRequest("TSRequest");
        tsRequest.version.value = 2L;
        NegoItem negoItem = new NegoItem("NegoItem");
        negoItem.negoToken.value = authenticateMessage;

        tsRequest.negoTokens.tags = new Tag[] {negoItem};

        tsRequest.pubKeyAuth.value = messageSignatureAndEncryptedServerPublicKey;
View Full Code Here

        // Length of packet
        ByteBuffer buf = new ByteBuffer(1024, true);

        TSRequest tsRequest = new TSRequest("TSRequest");
        tsRequest.version.value = 2L;
        NegoItem negoItem = new NegoItem("NegoItem");
        negoItem.negoToken.value = negoToken;
        tsRequest.negoTokens.tags = new Tag[] {negoItem};

        tsRequest.writeTag(buf);
View Full Code Here

        // Length of packet
        ByteBuffer buf = new ByteBuffer(4096, true);

        TSRequest tsRequest = new TSRequest("TSRequest");
        tsRequest.version.value = 2L;
        NegoItem negoItem = new NegoItem("NegoItem");
        negoItem.negoToken.value = authenticateMessage;

        tsRequest.negoTokens.tags = new Tag[] {negoItem};

        tsRequest.pubKeyAuth.value = messageSignatureAndEncryptedServerPublicKey;
View Full Code Here

    private byte[] getServerPublicKey() {
        // SSL certificate public key with algorithm
        ByteBuffer subjectPublicKeyInfo = new ByteBuffer(sslState.serverCertificateSubjectPublicKeyInfo);

        // Parse subjectPublicKeyInfo
        SubjectPublicKeyInfo parser = new SubjectPublicKeyInfo("SubjectPublicKeyInfo");
        parser.readTag(subjectPublicKeyInfo);

        // Copy subjectPublicKey subfield to separate byte buffer
        ByteBuffer subjectPublicKey = new ByteBuffer(subjectPublicKeyInfo.length);
        parser.subjectPublicKey.writeTag(subjectPublicKey);
View Full Code Here

    private byte[] getServerPublicKey() {
        // SSL certificate public key with algorithm
        ByteBuffer subjectPublicKeyInfo = new ByteBuffer(sslState.serverCertificateSubjectPublicKeyInfo);

        // Parse subjectPublicKeyInfo
        SubjectPublicKeyInfo parser = new SubjectPublicKeyInfo("SubjectPublicKeyInfo");
        parser.readTag(subjectPublicKeyInfo);

        // Copy subjectPublicKey subfield to separate byte buffer
        ByteBuffer subjectPublicKey = new ByteBuffer(subjectPublicKeyInfo.length);
        parser.subjectPublicKey.writeTag(subjectPublicKey);
View Full Code Here

    }

    private ByteBuffer generateTSCredentials() {
        ByteBuffer buf = new ByteBuffer(4096);

        TSCredentials tsCredentials = new TSCredentials("authInfo");
        // 1 means that credentials field contains a TSPasswordCreds structure
        tsCredentials.credType.value = 1L;

        ByteBuffer tsPasswordCredsBuf = new ByteBuffer(4096, true);
        TSPasswordCreds tsPasswordCreds = new TSPasswordCreds("credentials");
        tsPasswordCreds.domainName.value = new ByteBuffer(ntlmState.domain.getBytes(RdpConstants.CHARSET_16));
        tsPasswordCreds.userName.value = new ByteBuffer(ntlmState.user.getBytes(RdpConstants.CHARSET_16));
        tsPasswordCreds.password.value = new ByteBuffer(ntlmState.password.getBytes(RdpConstants.CHARSET_16));
        tsPasswordCreds.writeTag(tsPasswordCredsBuf);
        tsPasswordCredsBuf.trimAtCursor();
        //* DEBUG */System.out.println("TSPasswordCreds:\n" + tsPasswordCredsBuf.dump());

        tsCredentials.credentials.value = tsPasswordCredsBuf;

        tsCredentials.writeTag(buf);
        tsPasswordCredsBuf.unref();

        // Trim buffer to actual length of data written
        buf.trimAtCursor();
        //* DEBUG */System.out.println("TSCredentials:\n" + buf.dump());
View Full Code Here

    }

    private ByteBuffer generateTSCredentials() {
        ByteBuffer buf = new ByteBuffer(4096);

        TSCredentials tsCredentials = new TSCredentials("authInfo");
        // 1 means that credentials field contains a TSPasswordCreds structure
        tsCredentials.credType.value = 1L;

        ByteBuffer tsPasswordCredsBuf = new ByteBuffer(4096, true);
        TSPasswordCreds tsPasswordCreds = new TSPasswordCreds("credentials");
        tsPasswordCreds.domainName.value = new ByteBuffer(ntlmState.domain.getBytes(RdpConstants.CHARSET_16));
        tsPasswordCreds.userName.value = new ByteBuffer(ntlmState.user.getBytes(RdpConstants.CHARSET_16));
        tsPasswordCreds.password.value = new ByteBuffer(ntlmState.password.getBytes(RdpConstants.CHARSET_16));
        tsPasswordCreds.writeTag(tsPasswordCredsBuf);
        tsPasswordCredsBuf.trimAtCursor();
        //* DEBUG */System.out.println("TSPasswordCreds:\n" + tsPasswordCredsBuf.dump());

        tsCredentials.credentials.value = tsPasswordCredsBuf;

        tsCredentials.writeTag(buf);
        tsPasswordCredsBuf.unref();

        // Trim buffer to actual length of data written
        buf.trimAtCursor();
        //* DEBUG */System.out.println("TSCredentials:\n" + buf.dump());
View Full Code Here

        TSCredentials tsCredentials = new TSCredentials("authInfo");
        // 1 means that credentials field contains a TSPasswordCreds structure
        tsCredentials.credType.value = 1L;

        ByteBuffer tsPasswordCredsBuf = new ByteBuffer(4096, true);
        TSPasswordCreds tsPasswordCreds = new TSPasswordCreds("credentials");
        tsPasswordCreds.domainName.value = new ByteBuffer(ntlmState.domain.getBytes(RdpConstants.CHARSET_16));
        tsPasswordCreds.userName.value = new ByteBuffer(ntlmState.user.getBytes(RdpConstants.CHARSET_16));
        tsPasswordCreds.password.value = new ByteBuffer(ntlmState.password.getBytes(RdpConstants.CHARSET_16));
        tsPasswordCreds.writeTag(tsPasswordCredsBuf);
        tsPasswordCredsBuf.trimAtCursor();
        //* DEBUG */System.out.println("TSPasswordCreds:\n" + tsPasswordCredsBuf.dump());

        tsCredentials.credentials.value = tsPasswordCredsBuf;

View Full Code Here

        TSCredentials tsCredentials = new TSCredentials("authInfo");
        // 1 means that credentials field contains a TSPasswordCreds structure
        tsCredentials.credType.value = 1L;

        ByteBuffer tsPasswordCredsBuf = new ByteBuffer(4096, true);
        TSPasswordCreds tsPasswordCreds = new TSPasswordCreds("credentials");
        tsPasswordCreds.domainName.value = new ByteBuffer(ntlmState.domain.getBytes(RdpConstants.CHARSET_16));
        tsPasswordCreds.userName.value = new ByteBuffer(ntlmState.user.getBytes(RdpConstants.CHARSET_16));
        tsPasswordCreds.password.value = new ByteBuffer(ntlmState.password.getBytes(RdpConstants.CHARSET_16));
        tsPasswordCreds.writeTag(tsPasswordCredsBuf);
        tsPasswordCredsBuf.trimAtCursor();
        //* DEBUG */System.out.println("TSPasswordCreds:\n" + tsPasswordCredsBuf.dump());

        tsCredentials.credentials.value = tsPasswordCredsBuf;

View Full Code Here

TOP

Related Classes of rdpclient.ntlmssp.asn1.TSCredentials

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.