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

Various symbols should be SQLITE_PRIVATE or SQLITE_API #166

Closed
rogerbinns opened this issue Jun 3, 2024 · 3 comments
Closed

Various symbols should be SQLITE_PRIVATE or SQLITE_API #166

rogerbinns opened this issue Jun 3, 2024 · 3 comments

Comments

@rogerbinns
Copy link

There are various crypto symbols that in the amalgamation should be declared SQLITE_PRIVATE because they are private to this library. Similarly sqlite3mc_initialize/shutdown should be SQLITE_API.

apsw sets SQLITE_API and SQLITE_EXTERN to static and the resulting DLL contains a single exported symbol required by Python to load the extension. To repeat do this in the apsw-sqlite3mc project under Linux:

python3 setup.py build_ext --inplace --force --enable-all-extensions
nm  --extern-only --defined-only apsw/__init__.*.so | awk '{print $3}' | grep -v PyInit_apsw

Current list of publicly exported symbols:

ascon_aead_decrypt
ascon_aead_encrypt
ascon_hash
ascon_pbkdf2
ascon_pbkdf2_init
chacha20_ismemset
chacha20_rng
chacha20_xor
fastpbkdf2_hmac_sha1
fastpbkdf2_hmac_sha256
fastpbkdf2_hmac_sha512
poly1305
poly1305_tagcmp
RijndaelBlockDecrypt
RijndaelBlockEncrypt
RijndaelCreate
RijndaelDecrypt
RijndaelEncrypt
RijndaelInit
RijndaelInvalidate
RijndaelKeyEncToDec
RijndaelKeySched
RijndaelPadDecrypt
RijndaelPadEncrypt
sha1_final
sha1_init
sha1_transform
sha1_update
sha224
sha224_final
sha224_h0
sha224_init
sha224_update
sha256
sha256_final
sha256_h0
sha256_init
sha256_k
sha256_transform
sha256_update
sha384
sha384_final
sha384_h0
sha384_init
sha384_update
sha512
sha512_final
sha512_h0
sha512_init
sha512_k
sha512_transform
sha512_update
sqlcipher_hmac
sqlite3mc_initialize
sqlite3mc_shutdown
@utelle
Copy link
Owner

utelle commented Jun 3, 2024

I will adjust the function signatures accordingly.

utelle added a commit that referenced this issue Jun 4, 2024
- #166: Add missing SQLITE_PRIVATE attributes to several internal functions
- Add check for cipher configuration parameter legacy_page_size to accept only valid page sizes
@utelle
Copy link
Owner

utelle commented Jun 4, 2024

The attribute SQLITE_PRIVATE was added to several internal functions (where it was missing) in commit 56ac1e2.

@utelle utelle closed this as completed Jun 4, 2024
@rogerbinns
Copy link
Author

Confirmed - no external symbols visible now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants