Unresolved External sqlite3_user_add

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Unresolved External sqlite3_user_add

Andrew Stewart
Hi,
                I am trying to add the authentication extension in and I am getting this message.  I have included the 'userauth.c' at the bottom of the amalgamation.  I have included 'sqlite3userauth.h' at the bottom of sqlite3.h.  It finds it during the compile, but does not find it during the link.  I added "pragma message()" lines to the sqlite3.c code to see that it was going into this block and it was.  Have tried everything else that I can think of and still no luck.
                Any help would be appreciated.

Thanks,
Andrew Stewart
Software Designer


Notice: This electronic transmission contains confidential information, intended only for the person(s) named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or any other use of this email is strictly prohibited. If you have received this transmission by error, please notify us immediately by return email and destroy the original transmission immediately and all copies thereof.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unresolved External sqlite3_user_add

Dan Kennedy-4
On 02/22/2017 12:47 AM, Andrew Stewart wrote:
> Hi,
>                  I am trying to add the authentication extension in and I am getting this message.  I have included the 'userauth.c' at the bottom of the amalgamation.  I have included 'sqlite3userauth.h' at the bottom of sqlite3.h.  It finds it during the compile, but does not find it during the link.  I added "pragma message()" lines to the sqlite3.c code to see that it was going into this block and it was.  Have tried everything else that I can think of and still no luck.
>                  Any help would be appreciated.

Is SQLITE_USER_AUTHENTICATION defined at build time?

Or, are you using a C++ compiler? If so, you might need to add one of
those [extern "C"] blocks around the contents of sqlite3userauth.h. i.e.

#ifdef __cplusplus
extern "C" {
#endif

   // contents of sqlite3userauth.h

#ifdef __cplusplus
}
#endif

Or just insert sqlite3userauth.h inside the [extern "C"] block that is
already in sqlite3.h.

Dan.



>
> Thanks,
> Andrew Stewart
> Software Designer
>
>
> Notice: This electronic transmission contains confidential information, intended only for the person(s) named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or any other use of this email is strictly prohibited. If you have received this transmission by error, please notify us immediately by return email and destroy the original transmission immediately and all copies thereof.
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unresolved External sqlite3_user_add

Andrew Stewart
Hi,
Thanks for the response.  That worked.  Don't do enough work between C++ and C to remember to use the #ifdef statements.  Only 1 problem, the database can still be opened and the data viewed by other programs that are not compiled with SQLITE_USER_AUTHENTICATION.  I am testing with SQLite Studio.  It doesn't see the password table, but does see all of the data, even data that is actively changed from the application.
Is there a better way to do this?
What I am trying to do is hide my data.

Thanks
Andrew

-----Original Message-----
From: sqlite-users [mailto:[hidden email]] On Behalf Of Dan Kennedy
Sent: Tuesday, February 21, 2017 10:13 AM
To: [hidden email]
Subject: Re: [sqlite] Unresolved External sqlite3_user_add

On 02/22/2017 12:47 AM, Andrew Stewart wrote:
> Hi,
>                  I am trying to add the authentication extension in and I am getting this message.  I have included the 'userauth.c' at the bottom of the amalgamation.  I have included 'sqlite3userauth.h' at the bottom of sqlite3.h.  It finds it during the compile, but does not find it during the link.  I added "pragma message()" lines to the sqlite3.c code to see that it was going into this block and it was.  Have tried everything else that I can think of and still no luck.
>                  Any help would be appreciated.

Is SQLITE_USER_AUTHENTICATION defined at build time?

Or, are you using a C++ compiler? If so, you might need to add one of those [extern "C"] blocks around the contents of sqlite3userauth.h. i.e.

#ifdef __cplusplus
extern "C" {
#endif

   // contents of sqlite3userauth.h

#ifdef __cplusplus
}
#endif

Or just insert sqlite3userauth.h inside the [extern "C"] block that is already in sqlite3.h.

Dan.



>
> Thanks,
> Andrew Stewart
> Software Designer
>
>
> Notice: This electronic transmission contains confidential information, intended only for the person(s) named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or any other use of this email is strictly prohibited. If you have received this transmission by error, please notify us immediately by return email and destroy the original transmission immediately and all copies thereof.
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unresolved External sqlite3_user_add

Simon Slavin-3

On 21 Feb 2017, at 10:11pm, Andrew Stewart <[hidden email]> wrote:

> What I am trying to do is hide my data.

Then user-authentication is useless to you.  You need encryption.  The development team of SQLite also developed an encryption extension which is not free to use:

<https://www.sqlite.org/see/doc/trunk/www/index.wiki>

You may be able to find other ways of encrypting SQLite databases elsewhere.

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unresolved External sqlite3_user_add

Cezary H. Noweta
On 2017-02-21 23:16, Simon Slavin wrote:

> On 21 Feb 2017, at 10:11pm, Andrew Stewart <[hidden email]> wrote:

>> What I am trying to do is hide my data.
>
> Then user-authentication is useless to you.  You need encryption.

... and if you do not need a hardcore encryption, then you could
consider using of ``src\test_vfstrace.c'' (look at
``src\test_demovfs.c'', ``ext\misc\vfs*.c'', too) VFS filter driver. If
all you need is to prevent standard tools/libraries from opening your
DB, you will have to add some simple XOR/ADD operation on a read/written
data.

On the other side, an encryption does not ensure an user separation --
the encryption concerns a whole db-file, so one user having access to an
encrypted db-file could virtually read other user's data.

-- best regards

Cezary H. Noweta
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Loading...