Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Client certificate validation, what would be causing the issue, is there anything I can do about it?

Discussion in '2018.1 Beta' started by MostHated, Apr 25, 2018.

  1. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Hello,
    I am trying to get the RavenDB client side communication working on the server side of my game. I was using 2017.4, but Raven.Client.dll required .netstandard 2.0, so I am currently using 2018.1 b13 to test things out which seems to have fixed the "need .netstandard 2.0.0.0" issues and moved on within the code and has got to the point in the code to where it actually attempts to open a session to the DB but now I am getting the following errors.

    Code (CSharp):
    1. NotImplementedException: The method or operation is not implemented.
    2.   at System.Net.Http.HttpClientHandler.get_ServerCertificateCustomValidationCallback () [0x00000] in <20a8f293e89843148f03a963627efba4>:0
    3.   at Raven.Client.Http.RequestExecutor.CreateHttpMessageHandler (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Boolean setSslProtocols, System.Boolean useCompression, System.Boolean hasExplicitlySetCompressionUsage) [0x00051] in <c1b755c86a3a4cafbdaae7b2e82493b5>:0
    4.   at Raven.Client.Http.RequestExecutor.CreateClient () [0x0001d] in <c1b755c86a3a4cafbdaae7b2e82493b5>:0
    5.   at System.Lazy`1[T].CreateValue () [0x00081] in <e1a80661d61443feb3dbdaac88eeb776>:0
    6.   at System.Lazy`1[T].LazyInitValue () [0x00080] in <e1a80661d61443feb3dbdaac88eeb776>:0
    7.   at System.Lazy`1[T].get_Value () [0x0003a] in <e1a80661d61443feb3dbdaac88eeb776>:0
    8.   at Raven.Client.Http.RequestExecutor.GetCachedOrCreateHttpClient (System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue] httpClientCache) [0x00032] in <c1b755c86a3a4cafbdaae7b2e82493b5>:0
    9.   at Raven.Client.Http.RequestExecutor..ctor (System.String databaseName, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, Raven.Client.Documents.Conventions.DocumentConventions conventions, System.String[] initialUrls) [0x000eb] in <c1b755c86a3a4cafbdaae7b2e82493b5>:0
    10.   at Raven.Client.Http.RequestExecutor.Create (System.String[] initialUrls, System.String databaseName, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, Raven.Client.Documents.Conventions.DocumentConventions conventions) [0x00000] in <c1b755c86a3a4cafbdaae7b2e82493b5>:0
    11.   at Raven.Client.Documents.DocumentStore+<>c__DisplayClass19_0.<GetRequestExecutor>g__CreateRequestExecutor|0 () [0x00027] in <c1b755c86a3a4cafbdaae7b2e82493b5>:0
    12.   at System.Lazy`1[T].CreateValue () [0x00081] in <e1a80661d61443feb3dbdaac88eeb776>:0
    13.   at System.Lazy`1[T].LazyInitValue () [0x00080] in <e1a80661d61443feb3dbdaac88eeb776>:0
    14.   at System.Lazy`1[T].get_Value () [0x0003a] in <e1a80661d61443feb3dbdaac88eeb776>:0
    15.   at Raven.Client.Documents.DocumentStore.GetRequestExecutor (System.String database) [0x0008f] in <c1b755c86a3a4cafbdaae7b2e82493b5>:0
    16.   at Raven.Client.Documents.DocumentStore.OpenSession (Raven.Client.Documents.Session.SessionOptions options) [0x0002d] in <c1b755c86a3a4cafbdaae7b2e82493b5>:0
    17.   at Raven.Client.Documents.DocumentStore.OpenSession () [0x00006] in <c1b755c86a3a4cafbdaae7b2e82493b5>:0
    18.  
    I posted about it in the RavenDB support group and one of the replies was "That looks very much missing functionality on mono for client certificate validation."

    The way RavenDB 4.x currently works has you use X509Certificate in your connection details to point to a cert to allow it to connect to the DB. I am just running it locally currently with no certificate security, but I am guessing it still has certain parts of the code related to it. What I am wondering though, is there anything I can do about this, or is Unity just not compatible with it?

    Every time I try to use it, I get to a point where I am stuck and I figure it won't work, so I stop trying and get rid of it, but then come across something new info online somewhere that ends up working or fixing it until I reach the next halt, rinse and repeat, at least this time it seems like it is close, its to the point in which it's trying to make the connection. I wish I could just get a definitive answer so I could either use it, or move on, but its never that easy, lol. I like Raven and would like to use it, but if not, I might just have to try to switch it all to Mongo.
     
    Last edited: Apr 25, 2018
  2. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Ah, nevermind. Raven support said they were going to come out with a patch tomorrow to make it compatible with Unity. : D