diff --git a/MimeKit/Cryptography/X509CertificateDatabase.cs b/MimeKit/Cryptography/X509CertificateDatabase.cs index 1f8bb67ad5..5d7eb2122e 100644 --- a/MimeKit/Cryptography/X509CertificateDatabase.cs +++ b/MimeKit/Cryptography/X509CertificateDatabase.cs @@ -131,6 +131,10 @@ protected int SaltSize { static int ReadBinaryBlob (DbDataReader reader, int column, ref byte[] buffer) { +#if NETSTANDARD + buffer = reader.GetFieldValue (column); + return (int) buffer.Length; +#else long nread; // first, get the length of the buffer needed @@ -139,6 +143,7 @@ static int ReadBinaryBlob (DbDataReader reader, int column, ref byte[] buffer) // read the certificate data return (int) reader.GetBytes (column, 0, buffer, 0, (int) nread); +#endif } static X509Certificate DecodeCertificate (DbDataReader reader, X509CertificateParser parser, int column, ref byte[] buffer)