public UnwrapPrivilegedAction(GSSContext context, byte [] buffer, int start, int len, MessageProp messageProperties) { _buffer = buffer; _start = start; _len = len; _context = context; _messageProperties = messageProperties; }
public virtual byte[] GetMIC(byte[] message, int s, int l) { try { MessageProp prop = new MessageProp(0, true); return(context.GetMIC(message, s, l, prop)); } catch (GSSException) { return(null); } }
public byte [] Unwrap(byte [] incoming, int start, int len, MessageProp messageProp) { if (!Context.isEstablished()) { throw new LdapException("GSSAPI authentication not completed", LdapException.OTHER, ""); } if (!(Context.getConfState() || Context.getIntegState())) { // in the case no encryption and no integrity required - return the original data byte [] buff = new byte [len]; Array.Copy(incoming, start, buff, 0, len); return(buff); } sbyte [] result = Context.unwrap(TypeUtils.ToSByteArray(incoming), start, len, messageProp); return((byte [])TypeUtils.ToByteArray(result)); }
public byte [] Unwrap(byte [] incoming, int start, int len, MessageProp messageProp) { if (!Context.isEstablished ()) throw new LdapException ("GSSAPI authentication not completed",LdapException.OTHER,""); if (!(Context.getConfState () || Context.getIntegState ())) { // in the case no encryption and no integrity required - return the original data byte [] buff = new byte [len]; Array.Copy (incoming, start, buff, 0, len); return buff; } sbyte [] result = Context.unwrap (TypeUtils.ToSByteArray (incoming), start, len, messageProp); return (byte []) TypeUtils.ToByteArray (result); }