Examples of MessageProp


Examples of org.ietf.jgss.MessageProp

   
    /**
     * Unwrap a key
     */
    public byte[] unwrapKey(byte[] secret) throws WSSecurityException {
        MessageProp mProp = new MessageProp(0, true);
        try {
            return secContext.unwrap(secret, 0, secret.length, mProp);
        } catch (GSSException e) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Error in cleaning up a GSS context", e);
View Full Code Here

Examples of org.ietf.jgss.MessageProp

   
    /**
     * Wrap a key
     */
    public byte[] wrapKey(byte[] secret) throws WSSecurityException {
        MessageProp mProp = new MessageProp(0, true);
        try {
            return secContext.wrap(secret, 0, secret.length, mProp);
        } catch (GSSException e) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Error in cleaning up a GSS context", e);
View Full Code Here

Examples of org.ietf.jgss.MessageProp

                            }
                            final String clientName = gssContext.getSrcName().toString();
                            LOGGER.info("Context Established with Client " + clientName);

                            //encrypt
                            final MessageProp msgProp = new MessageProp(true);
                            final byte[] clientNameBytes = clientName.getBytes(GSSTestConstants.CHAR_ENC);
                            final byte[] outToken = gssContext.wrap(clientNameBytes, 0, clientNameBytes.length, msgProp);

                            dataOutputStream.writeInt(outToken.length);
                            dataOutputStream.write(outToken);
View Full Code Here

Examples of org.ietf.jgss.MessageProp

                }
            }

            token = new byte[dis.readInt()];
            dis.readFully(token);
            MessageProp msgProp = new MessageProp(false);
            final byte[] nameBytes = gssContext.unwrap(token, 0, token.length, msgProp);
            return new String(nameBytes, GSSTestConstants.CHAR_ENC);
        } catch (IOException e) {
            LOGGER.error("IOException occurred.", e);
            throw e;
View Full Code Here

Examples of org.ietf.jgss.MessageProp

   
    /**
     * Unwrap a key
     */
    public byte[] unwrapKey(byte[] secret) throws WSSecurityException {
        MessageProp mProp = new MessageProp(0, true);
        try {
            return secContext.unwrap(secret, 0, secret.length, mProp);
        } catch (GSSException e) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Error in cleaning up a GSS context", e);
View Full Code Here

Examples of org.ietf.jgss.MessageProp

   
    /**
     * Wrap a key
     */
    public byte[] wrapKey(byte[] secret) throws WSSecurityException {
        MessageProp mProp = new MessageProp(0, true);
        try {
            return secContext.wrap(secret, 0, secret.length, mProp);
        } catch (GSSException e) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Error in cleaning up a GSS context", e);
View Full Code Here

Examples of org.ietf.jgss.MessageProp

                    log.trace("RELEASED " + startupLatch);
                }
            } else {
                ByteBuffer buffer = packet.getBuffer();

                byte[] token = context.unwrap(buffer.array(), buffer.position(), buffer.remaining(), new MessageProp(0, true));
                UpPacket message = new UpPacket();
                message.setBuffer((ByteBuffer) ByteBuffer.allocate(token.length).put(token).flip());
                getUpProtocol().sendUp(message);
            }
        } catch (GSSException e) {
View Full Code Here

Examples of org.ietf.jgss.MessageProp

            for (Iterator iter = packet.getBuffers().iterator(); iter.hasNext();) {
                buffer.put((ByteBuffer) iter.next());
            }
            buffer.flip();

            byte[] token = context.wrap(buffer.array(), buffer.position(), buffer.remaining(), new MessageProp(0, true));
            PlainDownPacket reply = new PlainDownPacket();
            reply.setBuffers(Collections.singletonList(ByteBuffer.allocate(token.length).put(token).flip()));
            getDownProtocol().sendDown(reply);
        } catch (GSSException e) {
            throw new ProtocolException(e);
View Full Code Here

Examples of org.ietf.jgss.MessageProp

                    startupLatch.release();
                }
            } else {
                ByteBuffer buffer = packet.getBuffer();

                byte[] token = context.unwrap(buffer.array(), buffer.position(), buffer.remaining(), new MessageProp(0, true));
                UpPacket message = new UpPacket();
                message.setBuffer((ByteBuffer) ByteBuffer.allocate(token.length).put(token).flip());

                MetadataSupport.setSubject(message, clientSubject);
View Full Code Here

Examples of org.ietf.jgss.MessageProp

            for (Iterator iter = packet.getBuffers().iterator(); iter.hasNext();) {
                buffer.put((ByteBuffer) iter.next());
            }
            buffer.flip();

            byte[] token = context.wrap(buffer.array(), buffer.position(), buffer.remaining(), new MessageProp(0, true));
            PlainDownPacket reply = new PlainDownPacket();
            reply.setBuffers(Collections.singletonList(ByteBuffer.allocate(token.length).put(token).flip()));
            getDownProtocol().sendDown(reply);
        } catch (GSSException e) {
            throw new ProtocolException(e);
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.