Examples of gss_buffer_desc


Examples of edu.mit.jgss.swig.gss_buffer_desc

    public byte[] export() throws GSSException {
        long maj_status = 0;
        long[] min_status = {0};

        gss_buffer_desc exportName = new gss_buffer_desc();
        maj_status = gsswrapper.gss_export_name(min_status,
                this.getInternGSSName(),
                exportName);

        if (maj_status != gsswrapper.GSS_S_COMPLETE) {
            throw new GSSExceptionImpl((int)maj_status, (int)min_status[0]);
        }

        byte[] tmp_array = new byte[(int)exportName.getLength()];
        tmp_array = gsswrapper.getDescArray(exportName);

        gsswrapper.gss_release_buffer(min_status, exportName);
       
        return tmp_array;
View Full Code Here

Examples of edu.mit.jgss.swig.gss_buffer_desc

    public String toString() {
        long maj_status = 0;
        long[] min_status = {0};
        String outString;

        gss_buffer_desc output_name_buffer = new gss_buffer_desc();
        gss_OID_desc output_name_type = new gss_OID_desc();

        maj_status = gsswrapper.gss_display_name(min_status,
                this.internGSSName,
                output_name_buffer,
                output_name_type);

        if (maj_status != gsswrapper.GSS_S_COMPLETE)
            return null;

        outString = output_name_buffer.getValue();

        return outString;
    }
View Full Code Here

Examples of edu.mit.jgss.swig.gss_buffer_desc

    public Oid getStringNameType() throws GSSException {
        long maj_status = 0;
        long[] min_status = {0};

        gss_buffer_desc output_name_buffer = new gss_buffer_desc();
        gss_OID_desc output_name_type = new gss_OID_desc();

        maj_status = gsswrapper.gss_display_name(min_status,
                this.getInternGSSName(),
                output_name_buffer,
View Full Code Here

Examples of edu.mit.jgss.swig.gss_buffer_desc

    public boolean isMN() {
       
        long maj_status = 0;
        long[] min_status = {0};
        gss_buffer_desc exportName = new gss_buffer_desc();

        /* to test if our GSSName is a MN, we call the native
           export_name function and check for the
           GSS_S_NAME_NOT_MN error code */
        maj_status = gsswrapper.gss_export_name(min_status,
View Full Code Here

Examples of edu.mit.jgss.swig.gss_buffer_desc

    GSSName importName(String nameStr, Oid nameType) throws GSSException {
       
        long maj_status = 0;
        long[] min_status = {0};
        gss_buffer_desc nameBuffer = new gss_buffer_desc();

        if (nameStr == null) {
            if (DEBUG_ERR == true)
                System.out.println("nameStr == null, during createName");
            throw new GSSExceptionImpl((int)maj_status, (int)min_status[0]);
        }

        nameBuffer.setLength(nameStr.length());
        nameBuffer.setValue(nameStr);

        /* Check supported nametypes. If it's not a supported one, or null,
           throw exception */
        if (nameType != null &&
            !nameType.equals(GSSName.NT_HOSTBASED_SERVICE) &&
View Full Code Here

Examples of edu.mit.jgss.swig.gss_buffer_desc

   
    GSSName importName(byte[] nameStr, Oid nameType) throws GSSException {
       
        long maj_status = 0;
        long[] min_status = {0};
        gss_buffer_desc nameBuffer = new gss_buffer_desc();

        if (nameStr == null) {
            if (DEBUG_ERR == true)
                System.out.println("nameStr == null, during createName");
            throw new GSSExceptionImpl((int)maj_status, (int)min_status[0]);
        }

        /* copy byte[] to native gss_buffer_desc */
        gsswrapper.setDescArray(nameBuffer, nameStr);
        nameBuffer.setLength(nameStr.length);

        /* Check supported nametypes. If it's not a supported one, or null,
           throw exception */
        if (nameType != null &&
            !nameType.equals(GSSName.NT_HOSTBASED_SERVICE) &&
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.