From 892dbe845c98ff3fad3d682aaed3cd40b3161d4f Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Wed, 22 Jun 2022 01:40:55 +0700 Subject: ObsoleteAttribute cleanup --- crypto/src/openpgp/PgpPublicKey.cs | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'crypto/src/openpgp') diff --git a/crypto/src/openpgp/PgpPublicKey.cs b/crypto/src/openpgp/PgpPublicKey.cs index 0fcffc35a..f9e8c31f4 100644 --- a/crypto/src/openpgp/PgpPublicKey.cs +++ b/crypto/src/openpgp/PgpPublicKey.cs @@ -330,27 +330,6 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp get { return publicPk.GetTime(); } } - /// The number of valid days from creation time - zero means no expiry. - /// WARNING: This method will return 1 for keys with version > 3 that expire in less than 1 day - [Obsolete("Use 'GetValidSeconds' instead")] - public int ValidDays - { - get - { - if (publicPk.Version <= 3) - { - return publicPk.ValidDays; - } - - long expSecs = GetValidSeconds(); - if (expSecs <= 0) - return 0; - - int days = (int)(expSecs / (24 * 60 * 60)); - return System.Math.Max(1, days); - } - } - /// Return the trust data associated with the public key, if present. /// A byte array with trust data, null otherwise. public byte[] GetTrustData() -- cgit 1.5.1