public void Validate()
        {
            if (UserPublicKey == null)
            {
                throw new InvalidOperationException("UserPublicKey is missing in " + typeof(FidoRegistrationData).Name);
            }

            if (KeyHandle == null)
            {
                throw new InvalidOperationException("KeyHandle is missing in " + typeof(FidoRegistrationData).Name);
            }

            if (Signature == null)
            {
                throw new InvalidOperationException("Signature is missing in " + typeof(FidoRegistrationData).Name);
            }

            if (AttestationCertificate == null)
            {
                throw new InvalidOperationException("AttestationCertificate is missing in " + typeof(FidoRegistrationData).Name);
            }

            UserPublicKey.Validate();
            KeyHandle.Validate();
            Signature.Validate();
            AttestationCertificate.Validate();
        }
Beispiel #2
0
        public void Validate()
        {
            if (KeyHandle == null)
            {
                throw new InvalidOperationException("Key handle must not be null");
            }
            if (PublicKey == null)
            {
                throw new InvalidOperationException("Public key must not be null");
            }
            if (Certificate == null)
            {
                throw new InvalidOperationException("Certificate data must not be null");
            }

            KeyHandle.Validate();
            PublicKey.Validate();
            Certificate.Validate();
        }