Skip to content

Commit

Permalink
Merge pull request #351 from angelcolmenares/master
Browse files Browse the repository at this point in the history
Update X509CertificateDatabase.cs
  • Loading branch information
jstedfast committed Oct 30, 2017
2 parents 6f7e41d + 8300ca4 commit 508afa8
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit 508afa8

Please sign in to comment.