summary refs log tree commit diff
path: root/crypto/src/tls/CertificateType.cs
blob: ae83df7c9a3f4bf091d5952b60b1df143444e9bb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System;

namespace Org.BouncyCastle.Tls
{
    /// <summary>RFC 6091</summary>
    public abstract class CertificateType
    {
        public const short X509 = 0;
        public const short OpenPGP = 1;

        /*
         * RFC 7250
         */
        public const short RawPublicKey = 2;

        public static bool IsValid(short certificateType)
        {
            return certificateType >= X509 && certificateType <= RawPublicKey;
        }
    }
}