Пример #1
0
		static MonoBtlsX509FileType GetFileType (BtlsX509Format format)
		{
			switch (format) {
			case BtlsX509Format.DER:
				return MonoBtlsX509FileType.ASN1;
			case BtlsX509Format.PEM:
				return MonoBtlsX509FileType.PEM;
			default:
				throw new NotSupportedException ();
			}
		}
Пример #2
0
        static MonoBtlsX509FileType GetFileType(BtlsX509Format format)
        {
            switch (format)
            {
            case BtlsX509Format.DER:
                return(MonoBtlsX509FileType.ASN1);

            case BtlsX509Format.PEM:
                return(MonoBtlsX509FileType.PEM);

            default:
                throw new NotSupportedException();
            }
        }
Пример #3
0
 public byte[] GetRawData(BtlsX509Format format)
 {
     return(Instance.GetRawData((MonoBtlsX509Format)format));
 }
Пример #4
0
 public void AddDirectory(string dir, BtlsX509Format type)
 {
     Instance.AddDirectory(dir, (MonoBtlsX509FileType)type);
 }
Пример #5
0
 public void LoadFile(string file, BtlsX509Format type)
 {
     Instance.LoadFile(file, (MonoBtlsX509FileType)type);
 }
Пример #6
0
		public static X509Certificate2 CreateCertificate2 (byte[] data, BtlsX509Format format, bool disallowFallback = false)
		{
			return MonoBtlsProvider.CreateCertificate2 (data, (MonoBtlsX509Format)format, disallowFallback);
		}
Пример #7
0
		public static BtlsX509 CreateNative (byte[] data, BtlsX509Format format)
		{
			var x509 = MonoBtlsX509.LoadFromData (data, (MonoBtlsX509Format)format);
			return new BtlsX509 (x509);
		}
Пример #8
0
		public byte[] GetRawData (BtlsX509Format format)
		{
			return Instance.GetRawData ((MonoBtlsX509Format)format);
		}
Пример #9
0
		public void LoadFile (string file, BtlsX509Format type)
		{
			Instance.LoadFile (file, (MonoBtlsX509FileType)type);
		}
Пример #10
0
		public void AddFileLookup (string file, BtlsX509Format format)
		{
			Instance.AddFileLookup (file, GetFileType (format));
		}
Пример #11
0
		public void AddDirectoryLookup (string dir, BtlsX509Format format)
		{
			Instance.AddDirectoryLookup (dir, GetFileType (format));
		}
Пример #12
0
 public void AddFileLookup(string file, BtlsX509Format format)
 {
     Instance.AddFileLookup(file, GetFileType(format));
 }
Пример #13
0
 public void AddDirectoryLookup(string dir, BtlsX509Format format)
 {
     Instance.AddDirectoryLookup(dir, GetFileType(format));
 }
Пример #14
0
		public void AddDirectory (string dir, BtlsX509Format type)
		{
			Instance.AddDirectory (dir, (MonoBtlsX509FileType)type);
		}
Пример #15
0
        public static BtlsX509 CreateNative(byte[] data, BtlsX509Format format)
        {
            var x509 = MonoBtlsX509.LoadFromData(data, (MonoBtlsX509Format)format);

            return(new BtlsX509(x509));
        }
Пример #16
0
 public BoringX509Host(byte[] data, BtlsX509Format format)
 {
     this.data   = data;
     this.format = format;
 }
Пример #17
0
 public static X509Certificate2 CreateCertificate2(byte[] data, BtlsX509Format format, bool disallowFallback = false)
 {
     return(MonoBtlsProvider.CreateCertificate(data, (MonoBtlsX509Format)format));
 }
Пример #18
0
 public BoringX509HostAttribute(CertificateResourceType type, BtlsX509Format format)
     : base(typeof(BoringX509HostAttribute))
 {
     ResourceType = type;
     Format       = format;
 }