Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Using SSL MongoDB driver with FireDAC


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Aug 22, 2016 10:51 PM Last Post By: James Nachbar
James Nachbar

Posts: 14
Registered: 1/8/00
Using SSL MongoDB driver with FireDAC  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 9, 2016 11:26 PM
I am trying to connect to a MongoDB server using SSL, as encryption is needed for any production database system in the US, and I would like to be able to use my application in production. The docwiki says that the MongoDB driver provided with FireDAC does not support SSL, and it does not.

I am trying to build a MongoDB driver with SSL support that I can use with FireDAC, but I have not been able to get it to work with FireDAC. I put information about building the MongoDB driver at http://stackoverflow.com/questions/37372007/building-mongodb-c-driver-in-windows/38279664#38279664 and information about trying to get it to work with FireDAC at http://stackoverflow.com/questions/38279992/replace-the-windows-mongodb-c-driver-for-embarcadero-radstudio-c-builder-so-th .

I tried creating an application using the new ssl mongoc driver directly (outside FireDAC). I have not been able to get a C++ Builder application to compile when including the .h files for the mongoc driver, but I am able to connect to a MongoDB server using my compiled mongoc driver using a simple application written in Visual Studio C++, and it does connect using ssl.

Can you tell me how I can get a MongoDB driver that supports SSL working with FireDAC?

I am using C++ Builder on Seattle.

Thanks!
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Using SSL MongoDB driver with FireDAC  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 11, 2016 11:30 PM   in response to: James Nachbar in response to: James Nachbar
1) You should compile and use new both libmongoc and libbson. Of first look, the
issue may be related to incompatible DLL versions.
2) You wrote:
I get an error from Microsoft Visual C++ Runtime Library, that abort() has been called.
Could you provide the call stack for this error ?

--
With best regards,
Dmitry
James Nachbar

Posts: 14
Registered: 1/8/00
Re: Using SSL MongoDB driver with FireDAC  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 13, 2016 7:52 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Thank you for your reply.

Could you provide the call stack for this error ?

I'm not sure the best way to upload the call stack to the forum, so I attached a screenshot of the call stack window to my StackOverflow post here: http://stackoverflow.com/questions/37372007/building-mongodb-c-driver-in-windows/38279664#38279664

Thanks again!

Jim Nachbar
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Using SSL MongoDB driver with FireDAC  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 19, 2016 11:58 PM   in response to: James Nachbar in response to: James Nachbar
I just remembered we had something similar in past ... Then we decided to statically
link MS VC RTL / OpenSSL with libmongoc and libbson.

--
With best regards,
Dmitry
James Nachbar

Posts: 14
Registered: 1/8/00
Re: Using SSL MongoDB driver with FireDAC  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 22, 2016 10:50 PM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Thanks, Dmitry.

However, I am having trouble figuring out how to perform that static link. As noted above, I am using the instructions at http://mongoc.org/libmongoc/1.4.0/installing.html to compile the mongoc driver.

Also, did you use OpenSSL, or the Native TLS support, as described at http://mongoc.org/libmongoc/1.4.0/installing.html

Thanks!
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02