@Override public byte[] unwrap(byte[] incoming, int offset, int len) throws SaslException { MessageProp prop = new MessageProp(0, confidential); try { byte[] response = gssContext.unwrap(incoming, offset, len, prop); saslGssapi.tracef("Unwrapping message of length '%d' resulting message of length '%d'", len, response.length); return response; } catch (GSSException e) { throw saslGssapi.mechUnableToUnwrapMessage(e).toSaslException(); } }
byte[] unwrapped = gssContext.unwrap(message, 0, message.length, msgProp); if (unwrapped.length != 4) { throw saslGssapi.mechBadLengthOfMessageForNegotiatingSecurityLayer().toSaslException();
byte[] unwrapped; try { unwrapped = gssContext.unwrap(message, 0, message.length, msgProp); } catch (GSSException e) { throw saslGssapi.mechUnableToUnwrapMessage(e).toSaslException();
protected byte[] unwrap(byte [] msg) throws IOException { try { return this.context.unwrap(msg, 0, msg.length, null); } catch (ClosedGSSException e) { throw new EOFException("Remote host terminated connection"); } catch (GSSException e) { throw new ChainedIOException("unwrap failed", e); } }
protected byte[] unwrap(byte [] msg) throws IOException { try { return this.context.unwrap(msg, 0, msg.length, null); } catch (ClosedGSSException e) { throw new EOFException("Remote host terminated connection"); } catch (GSSException e) { throw new ChainedIOException("unwrap failed", e); } }
@Override protected byte[] decryptInternal(final byte[] bytes) throws EncryptionCodecException { LOGGER.trace("decryptInternal() called..."); try { LOGGER.debug("Decrypting content with context.unwrap()..."); return context.unwrap(bytes, 0, bytes.length, new MessageProp(0, true)); } catch (final GSSException gsse) { throw new EncryptionCodecException("Unable to decrypt the incoming ACI data.", gsse); } }
@Override public byte[] unwrap(byte[] token) throws IOException { checkState(isEstablished()); try { return context.unwrap(token, 0, token.length, prop); } catch (GSSException e) { throw new IOException("Failed to unwrap message: " + e.getMessage(), e); } }
/** * 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); } throw new WSSecurityException( WSSecurityException.FAILURE, "spnegoKeyError", null, e ); } }
/** * 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) { LOG.debug("Error in cleaning up a GSS context", e); throw new WSSecurityException( WSSecurityException.ErrorCode.FAILURE, e, "spnegoKeyError" ); } }
/** * 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); } throw new WSSecurityException( WSSecurityException.FAILURE, "spnegoKeyError", null, e ); } }
public byte[] run() throws Exception { final GSSContext context = getTicketValidation().getGssContext(); return context.unwrap(data, offset, length, new MessageProp(true)); } });
@Override public byte[] unwrap(byte[] incoming, int offset, int len) throws SaslException { MessageProp prop = new MessageProp(0, confidential); try { byte[] response = gssContext.unwrap(incoming, offset, len, prop); saslGssapi.tracef("Unwrapping message of length '%d' resulting message of length '%d'", len, response.length); return response; } catch (GSSException e) { throw saslGssapi.mechUnableToUnwrapMessage(e).toSaslException(); } }
@Override public byte[] unwrap(byte[] incoming, int offset, int len) throws SaslException { MessageProp prop = new MessageProp(0, confidential); try { byte[] response = gssContext.unwrap(incoming, offset, len, prop); saslGssapi.tracef("Unwrapping message of length '%d' resulting message of length '%d'", len, response.length); return response; } catch (GSSException e) { throw saslGssapi.mechUnableToUnwrapMessage(e).toSaslException(); } }
@Override public byte[] unwrap(byte[] incoming, int offset, int len) throws SaslException { MessageProp prop = new MessageProp(0, confidential); try { byte[] response = gssContext.unwrap(incoming, offset, len, prop); saslGssapi.tracef("Unwrapping message of length '%d' resulting message of length '%d'", len, response.length); return response; } catch (GSSException e) { throw saslGssapi.mechUnableToUnwrapMessage(e).toSaslException(); } }
protected void doWith(GSSContext context, Transport.Connection conn) throws Exception { //if (context.getMutualAuthState()) { // System.out.println("Mutual authentication took place!"); //} MessageProp prop = new MessageProp(0, false); byte[] token = conn.recvToken(); byte[] bytes = context.unwrap(token, 0, token.length, prop); //String str = new String(bytes, StandardCharsets.UTF_8); // System.out.println("Received data \"" // + str + "\" of length " + str.length()); //System.out.println("Confidentiality applied: " // + prop.getPrivacy()); prop.setQOP(0); token = context.getMIC(bytes, 0, bytes.length, prop); //System.out.println("Will send MIC token of size " //+ token.length); conn.sendToken(token); }
byte[] unwrapped = gssContext.unwrap(message, 0, message.length, msgProp); if (unwrapped.length != 4) { throw saslGssapi.mechBadLengthOfMessageForNegotiatingSecurityLayer().toSaslException();
byte[] unwrapped = gssContext.unwrap(message, 0, message.length, msgProp); if (unwrapped.length != 4) { throw saslGssapi.mechBadLengthOfMessageForNegotiatingSecurityLayer().toSaslException();
byte[] unwrapped = gssContext.unwrap(message, 0, message.length, msgProp); if (unwrapped.length != 4) { throw saslGssapi.mechBadLengthOfMessageForNegotiatingSecurityLayer().toSaslException();
byte[] unwrapped; try { unwrapped = gssContext.unwrap(message, 0, message.length, msgProp); } catch (GSSException e) { throw saslGssapi.mechUnableToUnwrapMessage(e).toSaslException();
byte[] unwrapped; try { unwrapped = gssContext.unwrap(message, 0, message.length, msgProp); } catch (GSSException e) { throw saslGssapi.mechUnableToUnwrapMessage(e).toSaslException();