Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update X509CertificateDatabase.cs #351

Merged
merged 2 commits into from
Oct 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions MimeKit/Cryptography/X509CertificateDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ protected X509CertificateDatabase (string password)

static int ReadBinaryBlob (DbDataReader reader, int column, ref byte[] buffer)
{
#if NETSTANDARD
buffer = reader.GetFieldValue<byte[]> (column);
return (int) buffer.Length;
#else
long nread;

// first, get the length of the buffer needed
Expand All @@ -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)
Expand Down