Skip to content

Commit

Permalink
Update dependencies and deprecated datetime command (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwlacewe authored Feb 19, 2025
1 parent 4b42654 commit 195b3c6
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 21 deletions.
26 changes: 13 additions & 13 deletions .github/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
blinker==1.8.2
blinker==1.9.0
cffi==1.17.1
click==8.1.7
colorlog==6.8.2
coverage==7.6.2
cryptography==43.0.1
Flask==3.0.3
gcovr==8.0
click==8.1.8
colorlog==6.9.0
coverage==7.6.12
cryptography==44.0.1
Flask==3.1.0
gcovr==8.3
imutils==0.5.4
itsdangerous==2.2.0
Jinja2==3.1.4
lxml==5.3.0
MarkupSafe==3.0.1
Jinja2==3.1.5
lxml==5.3.1
MarkupSafe==3.0.2
numpy==1.26.4
opencv-python-headless==4.9.0.80
protobuf==4.24.2
pycparser==2.22
Pygments==2.18.0
Pygments==2.19.1
pyzmq==26.0.3
scipy==1.14.1
scipy==1.15.2
sk-video==1.1.10
Werkzeug==3.0.6
Werkzeug==3.1.3
2 changes: 1 addition & 1 deletion .github/scripts/Dockerfile.checkin
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ RUN apt-get update -y && apt-get upgrade -y && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig && \
python3 -m pip install --no-cache-dir "numpy>=${NUMPY_MIN_VERSION},<2.0.0" "protobuf==4.${PROTOBUF_VERSION}" \
"coverage>=7.3.1" "cryptography>=42.0.7"
"coverage>=7.3.1" "cryptography>=44.0.1"

# COVERAGE TESTING
WORKDIR /vdms
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/setup_vdms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ make install

# INSTALL PYTHON PACKAGES
python -m pip install --no-cache-dir "numpy>=${NUMPY_MIN_VERSION},<2.0.0" "coverage>=7.3.1" \
"protobuf==4.${PROTOBUF_VERSION}" "cryptography>=42.0.7"
"protobuf==4.${PROTOBUF_VERSION}" "cryptography>=44.0.1"


# INSTALL VALIJSON
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ alias python3=/usr/bin/python3.x
Now that python is setup, now install Numpy and also install the coverage and cryptography packages if interested in running the Python unit tests.
```bash
python3 -m pip install --upgrade pip
python3 -m pip install --no-cache-dir "numpy>=1.26.0" "coverage>=7.3.1" "cryptography>=42.0.7"
python3 -m pip install --no-cache-dir "numpy>=1.26.0" "coverage>=7.3.1" "cryptography>=44.0.1"
```


Expand Down
2 changes: 1 addition & 1 deletion docker/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ RUN apt-get update -y && apt-get upgrade -y && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig && \
python3 -m pip install --no-cache-dir "numpy>=${NUMPY_MIN_VERSION},<2.0.0" "protobuf==4.${PROTOBUF_VERSION}" \
"coverage>=7.3.1" "cryptography>=42.0.7"
"coverage>=7.3.1" "cryptography>=44.0.1"

# VDMS
WORKDIR /vdms
Expand Down
12 changes: 8 additions & 4 deletions tests/tls_test/prep_certs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,18 @@ def generate_ca_certificate(subject_name, private_key):
]
)

current_time = datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None)

certificate = (
x509.CertificateBuilder()
.subject_name(subject)
.issuer_name(issuer)
.public_key(private_key.public_key())
.serial_number(x509.random_serial_number())
.not_valid_before(datetime.datetime.utcnow())
.not_valid_before(current_time)
.not_valid_after(
# Our certificate will be valid for 10 days
datetime.datetime.utcnow()
current_time
+ datetime.timedelta(days=10)
)
.add_extension(
Expand Down Expand Up @@ -70,16 +72,18 @@ def generate_signed_certificate(

issuer = issuer_certificate.subject

current_time = datetime.datetime.now(datetime.timezone.utc).replace(tzinfo=None)

certificate = (
x509.CertificateBuilder()
.subject_name(subject)
.issuer_name(issuer)
.public_key(subject_private_key.public_key())
.serial_number(x509.random_serial_number())
.not_valid_before(datetime.datetime.utcnow())
.not_valid_before(current_time)
.not_valid_after(
# Our certificate will be valid for 10 days
datetime.datetime.utcnow()
current_time
+ datetime.timedelta(days=10)
)
.add_extension(
Expand Down

0 comments on commit 195b3c6

Please sign in to comment.