Exemplo n.º 1
0
		public UnwrapPrivilegedAction(GSSContext context, byte [] buffer, int start, int len, MessageProp messageProperties)
		{
			_buffer = buffer;
			_start = start;
			_len = len;
			_context = context;
			_messageProperties = messageProperties;
		}
 public UnwrapPrivilegedAction(GSSContext context, byte [] buffer, int start, int len, MessageProp messageProperties)
 {
     _buffer            = buffer;
     _start             = start;
     _len               = len;
     _context           = context;
     _messageProperties = messageProperties;
 }
Exemplo n.º 3
0
 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);
     }
 }
Exemplo n.º 4
0
        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));
        }
Exemplo n.º 5
0
		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);
		}