Ejemplo n.º 1
0
        /// <summary>
        /// Encrypts Message. User decides what SecBuffers are used.
        /// </summary>
        /// <param name="securityBuffers">
        /// the security buffer array to verify.<para/>
        /// it can contain none or some data security buffer, that are combine to one message to verify.<para/>
        /// it must contain token security buffer, in which the signature is stored.
        /// </param>
        /// <exception cref="ArgumentNullException">the securityBuffers must not be null</exception>
        /// <exception cref="ArgumentException">securityBuffers must contain signature to verify</exception>
        public override bool Verify(params SecurityBuffer[] securityBuffers)
        {
            NlmpUtility.UpdateSealingKeyForConnectionlessMode(
                this.client.Context.ClientConfigFlags, this.client.Context.ServerHandle,
                this.client.Context.ServerSealingKey, this.serverSequenceNumber);

            return(NlmpUtility.GssApiVerify(
                       this.client.Config.Version,
                       this.Context.ClientConfigFlags,
                       this.client.Context.ServerHandle,
                       this.client.Context.ServerSigningKey,
                       ref this.serverSequenceNumber,
                       securityBuffers));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Encrypts Message. User decides what SecBuffers are used.
        /// </summary>
        /// <param name="securityBuffers">
        /// the security buffer array to verify.<para/>
        /// it can contain none or some data security buffer, that are combine to one message to verify.<para/>
        /// it must contain token security buffer, in which the signature is stored.
        /// </param>
        /// <exception cref="ArgumentNullException">the securityBuffers must not be null</exception>
        /// <exception cref="ArgumentException">securityBuffers must contain signature to verify</exception>
        public override bool Verify(params SecurityBuffer[] securityBuffers)
        {
            NlmpUtility.UpdateSealingKeyForConnectionlessMode(
                this.nlmpServer.Context.NegFlg, this.nlmpServer.Context.ClientHandle,
                this.nlmpServer.Context.ClientSealingKey, this.clientSequenceNumber);

            return(NlmpUtility.GssApiVerify(
                       this.version,
                       this.nlmpServer.Context.NegFlg,
                       this.nlmpServer.Context.ClientHandle,
                       this.nlmpServer.Context.ClientSigningKey,
                       ref this.clientSequenceNumber,
                       securityBuffers));
        }