You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.4 KiB
64 lines
1.4 KiB
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR) |
|
#pragma warning disable |
|
using System; |
|
using System.Collections; |
|
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities; |
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509; |
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Pkcs |
|
{ |
|
public class X509CertificateEntry |
|
: Pkcs12Entry |
|
{ |
|
private readonly X509Certificate cert; |
|
|
|
public X509CertificateEntry( |
|
X509Certificate cert) |
|
: base(BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Platform.CreateHashtable()) |
|
{ |
|
this.cert = cert; |
|
} |
|
|
|
#if !(SILVERLIGHT || PORTABLE || NETFX_CORE) |
|
[Obsolete] |
|
public X509CertificateEntry( |
|
X509Certificate cert, |
|
Hashtable attributes) |
|
: base(attributes) |
|
{ |
|
this.cert = cert; |
|
} |
|
#endif |
|
|
|
public X509CertificateEntry( |
|
X509Certificate cert, |
|
IDictionary attributes) |
|
: base(attributes) |
|
{ |
|
this.cert = cert; |
|
} |
|
|
|
public X509Certificate Certificate |
|
{ |
|
get { return this.cert; } |
|
} |
|
|
|
public override bool Equals(object obj) |
|
{ |
|
X509CertificateEntry other = obj as X509CertificateEntry; |
|
|
|
if (other == null) |
|
return false; |
|
|
|
return cert.Equals(other.cert); |
|
} |
|
|
|
public override int GetHashCode() |
|
{ |
|
return ~cert.GetHashCode(); |
|
} |
|
} |
|
} |
|
#pragma warning restore |
|
#endif
|
|
|