FirebirdSQL / NETProvider

Firebird ADO.NET Data Provider
https://www.firebirdsql.org/en/net-provider/
Other
152 stars 63 forks source link

Exception with NetProvider 8.5.0 under Opensuse 15.2 #980

Closed hhfiddelke closed 2 years ago

hhfiddelke commented 2 years ago

When i installed FirebirdSql.Data.FirebirdClient version 8.5.0 in VS2019 for my Application running under DotNet5.0 under Linux (OpenSuse 15.2) i get the following exception on my Linux- box. Using FBClient- Version 8.0.1 works fine.

System.UnhandledExceptionEventArgs
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'secur32' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libsecur32: cannot open shared object file: No such file or directory
   at FirebirdSql.Data.Client.Managed.SspiHelper.AcquireCredentialsHandle(String pszPrincipal, String pszPackage, Int32 fCredentialUse, IntPtr PAuthenticationID, IntPtr pAuthData, Int32 pGetKeyFn, IntPtr pvGetKeyArgument, SecHandle& phCredential, SecInteger& ptsExpiry)
   at FirebirdSql.Data.Client.Managed.SspiHelper..ctor(String securityPackage, String remotePrincipal)
   at FirebirdSql.Data.Client.Managed.SspiHelper..ctor(String securityPackage)
   at FirebirdSql.Data.Client.Managed.SspiHelper..ctor()
   at FirebirdSql.Data.Client.Managed.AuthBlock..ctor(String user, String password, WireCryptOption wireCrypt)
   at FirebirdSql.Data.Client.Managed.GdsConnection.Identify(String database)
   at FirebirdSql.Data.Client.ClientFactory.CreateManagedDatabase(ConnectionString options)
   at FirebirdSql.Data.Client.ClientFactory.CreateDatabase(ConnectionString options)
   at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
   at FirebirdSql.Data.FirebirdClient.FbConnection.Open()
   at CDK_POS_Terminal.MainClass.Main(String[] args) in D:\Projekte\CDK_POS\Program.cs:line 1020

Under Windows i have to configure "WireCrypt= Enabled" in the firebird.conf file of the FB-server if i enabled WireCrypt in the connectionstring in my CSharp-Code . This was also not a problem with 8.0.1

cincuranet commented 2 years ago

Fixed via aabbe9589ccd4df4029c6ef5310d4e305b5131d2. If you want to try build from CI, it's here.

hhfiddelke commented 2 years ago

First bug seems to be fixed, but the second one seems to remain. If "WireCrypt" is not configured the Firebird-Servers firebird.conf file, and the client sets "WireCrypt" = Disabled, you get the error:

IscException: Client attempted to attach unencrypted but wire encryption is required

this was not an issue under 8.0.1. But i do not know which one is buggy.😉

cincuranet commented 2 years ago

Please open new issue for the WireCrypt and describe what the server setting is and what's in connection string.