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

GenerixSQL: update docker image with cryptography #34754

Merged
merged 4 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docker/genericsql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libc-dev \
libssl-dev \
unixodbc-dev \
&& wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.1.39.tar.gz \
# && wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.1.39.tar.gz \
&& wget --no-check-certificate https://www.freetds.org/files/stable/freetds-1.1.39.tar.gz \
&& tar -xzf freetds-1.1.39.tar.gz \
&& cd freetds-1.1.39 \
&& ./configure --with-openssl --with-unixodbc=/usr --enable-msdblib \
Expand Down
1 change: 1 addition & 0 deletions docker/genericsql/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ psycopg2-binary = "*"
pyodbc = "*"
cx-oracle = "*"
expiringdict = "*"
cryptography = "*"

[requires]
python_version = "3.11"
197 changes: 195 additions & 2 deletions docker/genericsql/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion docker/genericsql/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import psycopg2
import cx_Oracle
import teradatasqlalchemy
import pymysql

assert 'FreeTDS' in pyodbc.drivers()
assert 'ODBC Driver 18 for SQL Server' in pyodbc.drivers(), pyodbc.drivers()
Expand All @@ -15,7 +16,6 @@
except Exception as ex:
assert 'ORA-12162' in str(ex)


# freetds test
engine = sqlalchemy.create_engine('mssql+pyodbc:///testuser:[email protected]:1433/TEST?driver=FreeTDS')
try:
Expand All @@ -26,4 +26,11 @@
# teradata test: raises sqlalchemy.exc.NoSuchModuleError if the plugin is not installed
eng = sqlalchemy.create_engine('teradatasql://guest:foo@bar')

# test there no missing 'cryptography' module
try:
pymysql._auth.sha2_rsa_encrypt(b'test', b'test', 'test')
except TypeError as ex:
assert "argument 'data': from_buffer() cannot return the address of a unicode object" in str(ex)


print("All is good. All imported successfully")
Loading