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

Exception while importing certificate to postgres DB #286

Closed
OlehKhitrin opened this issue Mar 9, 2017 · 5 comments
Closed

Exception while importing certificate to postgres DB #286

OlehKhitrin opened this issue Mar 9, 2017 · 5 comments
Labels
bug Something isn't working

Comments

@OlehKhitrin
Copy link

I'm trying to use postgres for certificates posession. When I import certificate, I receive a "System.InvalidOperationException".
Message: "@algorithms' must have its value set"
StackTrace:
at Npgsql.NpgsqlParameter.ResolveHandler(TypeHandlerRegistry registry)
at Npgsql.NpgsqlParameter.Bind(TypeHandlerRegistry registry)
at Npgsql.NpgsqlCommand.ValidateParameters()
at Npgsql.NpgsqlCommand.Execute(CommandBehavior behavior)
at Npgsql.NpgsqlCommand.ExecuteNonQueryInternal()
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
at MimeKit.Cryptography.X509CertificateDatabase.Add(X509CertificateRecord record)
at MimeKit.Cryptography.DefaultSecureMimeContext.Import(X509Certificate certificate)
Does anybody know how to fix it?

jstedfast added a commit that referenced this issue Mar 9, 2017
…Database

This should allow the Npgsql backend to work (apparently it doesn't allow null)

Fixes issue #286
@jstedfast
Copy link
Owner

MimeKit created the table to allow null values in the ALGORITHMS column, but apparently Postgres is a bit stricter than the other SQL-backends which work fine.

Could you grab the latest source code, compile it, and check that it works for you now?

If it does, I'll make a new nuget release this weekend (or as soon as I hear back from you that this fixes things).

@jstedfast jstedfast added the bug Something isn't working label Mar 9, 2017
@OlehKhitrin
Copy link
Author

OlehKhitrin commented Mar 9, 2017 via email

jstedfast added a commit that referenced this issue Mar 9, 2017
@jstedfast
Copy link
Owner

Try that.

@OlehKhitrin
Copy link
Author

OlehKhitrin commented Mar 9, 2017 via email

@jstedfast
Copy link
Owner

I'll push out a new release this weekend. Thanks for verifying the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants