Skip to content

Commit

Permalink
libgit2: disable strict hash verification
Browse files Browse the repository at this point in the history
Disables strict verification of object hashsums when reading objects
from disk. Eliminates an additional checksum calculation on each object.

https://github.com/libgit2/libgit2/search?q=GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION&type=issues
  • Loading branch information
rcoup committed Apr 7, 2021
1 parent 525ec3c commit fa2c150
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sno/__init__.py
Original file line number Diff line number Diff line change
@@ -75,10 +75,14 @@
ogr.UseExceptions()
osr.UseExceptions()

# Libgit2 options
import pygit2

pygit2.option(pygit2.GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, 0)

# Libgit2 TLS CA Certificates
# We build libgit2 to prefer the OS certificate store on Windows/macOS, but Linux doesn't have one.
if is_linux:
import certifi
import pygit2

pygit2.settings.ssl_cert_file = certifi.where()

0 comments on commit fa2c150

Please sign in to comment.