/*
         * Public certificates functionality
         */
        public void AddCertificate(PublicCertificate publicCert)
        {
            _dbContext.PublicCertificates.Add(publicCert);

            _logger.LogInformation(
                string.Format(
                    "Added new certificate of user {0} with serial number {1} to DB",
                    publicCert.Uid,
                    publicCert.SerialNr
                    )
                );
            _dbContext.SaveChanges();
        }
Exemple #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PublicCertificate.Length != 0)
            {
                hash ^= PublicCertificate.GetHashCode();
            }
            if (PrivateKey.Length != 0)
            {
                hash ^= PrivateKey.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }