protected virtual void Dispose(bool disposing) { }
public override bool Equals(object? obj) { throw null; }
public virtual bool Equals(System.Security.Cryptography.X509Certificates.X509Certificate? other) { throw null; }
- public virtual byte[]? Export(System.Security.Cryptography.X509Certificates.X509ContentType contentType) { throw null; }
+ public virtual byte[] Export(System.Security.Cryptography.X509Certificates.X509ContentType contentType) { throw null; }
[System.CLSCompliantAttribute(false)]
- public virtual byte[]? Export(System.Security.Cryptography.X509Certificates.X509ContentType contentType, System.Security.SecureString? password) { throw null; }
- public virtual byte[]? Export(System.Security.Cryptography.X509Certificates.X509ContentType contentType, string? password) { throw null; }
+ public virtual byte[] Export(System.Security.Cryptography.X509Certificates.X509ContentType contentType, System.Security.SecureString? password) { throw null; }
+ public virtual byte[] Export(System.Security.Cryptography.X509Certificates.X509ContentType contentType, string? password) { throw null; }
protected static string FormatDate(System.DateTime date) { throw null; }
public virtual byte[] GetCertHash() { throw null; }
public virtual byte[] GetCertHash(System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
DateTime NotAfter { get; }
DateTime NotBefore { get; }
byte[] RawData { get; }
- byte[]? Export(X509ContentType contentType, SafePasswordHandle password);
+ byte[] Export(X509ContentType contentType, SafePasswordHandle password);
}
}
public DateTime NotAfter => _realPal.NotAfter;
public DateTime NotBefore => _realPal.NotBefore;
public byte[] RawData => _realPal.RawData;
- public byte[]? Export(X509ContentType contentType, SafePasswordHandle password) =>
+ public byte[] Export(X509ContentType contentType, SafePasswordHandle password) =>
_realPal.Export(contentType, password);
}
}
sb.AppendLine("[Private Key]");
}
- public byte[]? Export(X509ContentType contentType, SafePasswordHandle password)
+ public byte[] Export(X509ContentType contentType, SafePasswordHandle password)
{
using (IExportPal storePal = StorePal.FromCertificate(this))
{
- return storePal.Export(contentType, password);
+ byte[]? exported = storePal.Export(contentType, password);
+ Debug.Assert(exported != null);
+ return exported;
}
}
throw new CryptographicException();
}
- public byte[]? Export(X509ContentType contentType, SafePasswordHandle password)
+ public byte[] Export(X509ContentType contentType, SafePasswordHandle password)
{
using (IExportPal storePal = StorePal.FromCertificate(this))
{
- return storePal.Export (contentType, password);
+ byte[]? exported = storePal.Export(contentType, password);
+ Debug.Assert(exported != null);
+ return exported;
}
}
}
_certContext = certContext;
}
- public byte[]? Export(X509ContentType contentType, SafePasswordHandle password)
+ public byte[] Export(X509ContentType contentType, SafePasswordHandle password)
{
using (IExportPal storePal = StorePal.FromCertificate(this))
{
- return storePal.Export(contentType, password);
+ byte[]? exported = storePal.Export(contentType, password);
+ Debug.Assert(exported != null);
+ return exported;
}
}
}
return true;
}
- public virtual byte[]? Export(X509ContentType contentType)
+ public virtual byte[] Export(X509ContentType contentType)
{
return Export(contentType, (string?)null);
}
- public virtual byte[]? Export(X509ContentType contentType, string? password)
+ public virtual byte[] Export(X509ContentType contentType, string? password)
{
VerifyContentType(contentType);
}
[System.CLSCompliantAttribute(false)]
- public virtual byte[]? Export(X509ContentType contentType, SecureString? password)
+ public virtual byte[] Export(X509ContentType contentType, SecureString? password)
{
VerifyContentType(contentType);