thorntechpublic / pgpdecryptionlambda Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Installing Gnupg and its dependent libraries from source on the AWS Lambda Docker image public.ecr.aws/lambda/python:3.9
, fails due to the libraries being undetected with the error: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
Doing a default installation of the libraries was successful, but when I went to install Gnupg do the default path, the make check fails all of the tests with the following error
./t-stringhelp: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-stringhelp
./t-timestuff: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-timestuff
./t-convert: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-convert
./t-percent: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-percent
./t-gettime: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-gettime
./t-sysutils: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-sysutils
./t-sexputil: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-sexputil
./t-session-env: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-session-env
./t-openpgp-oid: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-openpgp-oid
./t-ssh-utils: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-ssh-utils
./t-mapstrings: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-mapstrings
./t-zb32: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-zb32
./t-mbox-util: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-mbox-util
./t-iobuf: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-iobuf
./t-strlist: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-strlist
./t-name-value: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-name-value
./t-ccparray: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-ccparray
./t-recsel: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-recsel
./t-w32-cmdline: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-w32-cmdline
./t-exechelp: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-exechelp
./t-exectool: error while loading shared libraries: libgcrypt.so.20: cannot open shared object file: No such file or directory
FAIL: t-exectool
=======================================
21 of 21 tests failed
Please report to https://bugs.gnupg.org
=======================================
make[3]: *** [check-TESTS] Error 1
make[3]: Leaving directory `/build/gnupg-2.2.40/common'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/build/gnupg-2.2.40/common'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/build/gnupg-2.2.40/common'
make: *** [check-recursive] Error 1
Attempting to set the configure prefix to /usr allowed me to install libgpg-error with no issue but attempting to install libgcrypt, it fails to do the make command due to a undefined refference to GPG_ERROR
libtool: link: gcc -g -O2 -fvisibility=hidden -fno-delete-null-pointer-checks -Wall -o t-secmem t-secmem.o -Wl,--disable-new-dtags ../src/.libs/libgcrypt.so ../compat/.libs/libcompat.a -Wl,-rpath -Wl,/build/libgcrypt-1.10.1/src/.libs
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_fprintf@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpg_err_code_from_syserror@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_get_syscall_clamp@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_lock_init@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_fwrite@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpg_err_code_from_errno@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_lock_unlock@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_b64dec_start@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_rewind@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_b64dec_finish@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_lock_lock@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpg_err_set_errno@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpg_strsource@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_fclose@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_b64dec_proc@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_fopenmem@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpg_strerror@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_fclose_snatch@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_ferror@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_lock_destroy@GPG_ERROR_1.0'
collect2: error: ld returned 1 exit status
make[2]: *** [t-secmem] Error 1
make[2]: Leaving directory `/build/libgcrypt-1.10.1/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/build/libgcrypt-1.10.1'
make: *** [all] Error 2
When attempting to install gnupg from source the following error occurs when using the make command:
gcc -std=gnu99 -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -Wall -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -g -O2 -o dirmngr dirmngr.o server.o crlcache.o crlfetch.o certcache.o domaininfo.o workqueue.o loadswdb.o cdblib.o misc.o ocsp.o validate.o dns-stuff.o http.o http-common.o http-ntbtls.o ks-action.o ks-engine-hkp.o ks-engine-http.o ks-engine-finger.o ks-engine-kdns.o dns.o ../common/libcommonpth.a -lresolv -L/usr/local/lib -lassuan -L/usr/local/lib -lksba -lgpg-error -L/usr/local/lib -lnpth -lpthread -L/usr/local/lib -lgcrypt -L/usr/local/lib -lgpg-error
server.o: In function `start_command_handler':
/build/gnupg-2.2.40/dirmngr/server.c:3138: undefined reference to `ks_ldap_free_state'
collect2: error: ld returned 1 exit status
make[2]: *** [dirmngr] Error 1
make[2]: Leaving directory `/build/gnupg-2.2.40/dirmngr'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/build/gnupg-2.2.40'
make: *** [all] Error 2
A customer support ticket was opened in which an issue occurred where the PGP Decryption Lambda encountering a decryption error.
Upon further investigation, we have discovered that the base images are using outdated versions of GnuPG which do not recognize GPG keys that were generated in GnuPG version 2.3 and newer.
According to the GnuPG New File, version 2.3.0 was released in 2021-04-07 and changed the way that GPG keys were generated. As a result any version of GnuPG below version 2.2.28 would not recognize a key generated in version 2.3+.
For the base images in this project, Google used GnuPG version 2.2.4, for AWS 2.0.22, and in Azure 2.2.12. For this reason GnuPG needs to be updated for each cloud provider.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.