Package org.tmatesoft.svn.core.internal.util.jna.ISVNSecurityLibrary

Examples of org.tmatesoft.svn.core.internal.util.jna.ISVNSecurityLibrary.SecBufferDesc


        outSecBuffer.cbBuffer = new NativeLong(512);
        outSecBuffer.BufferType = new NativeLong(ISVNSecurityLibrary.SECBUFFER_TOKEN);
        outSecBuffer.pvBuffer = new Memory(512);
        outSecBuffer.write();
       
        SecBufferDesc outBufferDescription = new SecBufferDesc();
        outBufferDescription.ulVersion = new NativeLong(0);
        outBufferDescription.cBuffers = new NativeLong(1);
        outBufferDescription.pBuffers = outSecBuffer.getPointer();

        outBufferDescription.write();
       
        SecBufferDesc inBufferDescription = null;
        SecBuffer inSecBuffer = null;
        if (lastToken != null) {
            inSecBuffer = new SecBuffer();
            inSecBuffer.cbBuffer = new NativeLong(lastToken.length);
            inSecBuffer.BufferType = new NativeLong(ISVNSecurityLibrary.SECBUFFER_TOKEN);
            inSecBuffer.pvBuffer = new Memory(lastToken.length);
            inSecBuffer.pvBuffer.write(0, lastToken, 0, lastToken.length);
            inSecBuffer.write();
               
            inBufferDescription = new SecBufferDesc();
            inBufferDescription.ulVersion = new NativeLong(0);
            inBufferDescription.cBuffers = new NativeLong(1);
            inBufferDescription.pBuffers = inSecBuffer.getPointer();
            inBufferDescription.write();
        }
       
        Pointer contextAttributes = new Memory(NativeLong.SIZE);
        TimeStamp ltime = new TimeStamp();
        ltime.HighPart = new NativeLong(0);
        ltime.LowPart = new NativeLong(0);
        ltime.write();
       
        int securityStatus = library.InitializeSecurityContextW(params.myCrdHandle.getPointer(),
                pContext != null ? pContext.getPointer() : Pointer.NULL,
                        null,
                        new NativeLong(0),
                        new NativeLong(0),
                        new NativeLong(ISVNSecurityLibrary.SECURITY_NATIVE_DREP),
                        lastToken != null ? inBufferDescription.getPointer() : Pointer.NULL,
                                new NativeLong(0),
                                newContext.getPointer(),
                                outBufferDescription.getPointer(),
                                contextAttributes,
                                ltime.getPointer());
View Full Code Here


        outSecBuffer.cbBuffer = new NativeLong(512);
        outSecBuffer.BufferType = new NativeLong(ISVNSecurityLibrary.SECBUFFER_TOKEN);
        outSecBuffer.pvBuffer = new Memory(512);
        outSecBuffer.write();
       
        SecBufferDesc outBufferDescription = new SecBufferDesc();
        outBufferDescription.ulVersion = new NativeLong(0);
        outBufferDescription.cBuffers = new NativeLong(1);
        outBufferDescription.pBuffers = outSecBuffer.getPointer();

        outBufferDescription.write();
       
        SecBufferDesc inBufferDescription = null;
        SecBuffer inSecBuffer = null;
        if (lastToken != null) {
            inSecBuffer = new SecBuffer();
            inSecBuffer.cbBuffer = new NativeLong(lastToken.length);
            inSecBuffer.BufferType = new NativeLong(ISVNSecurityLibrary.SECBUFFER_TOKEN);
            inSecBuffer.pvBuffer = new Memory(lastToken.length);
            inSecBuffer.pvBuffer.write(0, lastToken, 0, lastToken.length);
            inSecBuffer.write();
               
            inBufferDescription = new SecBufferDesc();
            inBufferDescription.ulVersion = new NativeLong(0);
            inBufferDescription.cBuffers = new NativeLong(1);
            inBufferDescription.pBuffers = inSecBuffer.getPointer();
            inBufferDescription.write();
        }
       
        Pointer contextAttributes = new Memory(NativeLong.SIZE);
        TimeStamp ltime = new TimeStamp();
        ltime.HighPart = new NativeLong(0);
        ltime.LowPart = new NativeLong(0);
        ltime.write();
       
        int securityStatus = library.InitializeSecurityContextW(params.myCrdHandle.getPointer(),
                pContext != null ? pContext.getPointer() : Pointer.NULL,
                        null,
                        new NativeLong(0),
                        new NativeLong(0),
                        new NativeLong(ISVNSecurityLibrary.SECURITY_NATIVE_DREP),
                        lastToken != null ? inBufferDescription.getPointer() : Pointer.NULL,
                                new NativeLong(0),
                                newContext.getPointer(),
                                outBufferDescription.getPointer(),
                                contextAttributes,
                                ltime.getPointer());
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.internal.util.jna.ISVNSecurityLibrary.SecBufferDesc

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.