public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] [checksum] Do not use secure memory for pygcrypt backend
@ 2017-12-05 20:00 Michał Górny
  2017-12-05 21:35 ` Zac Medico
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2017-12-05 20:00 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Michał Górny

Disable using secure memory for pygcrypt backend since we are not
processing secrets. This can avoid the libgcrypt memory error; however,
it turned out to be a huge memory/resource leak which needs to be fixed
independently.
---
 pym/portage/checksum.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py
index 9e7bffea9..4174638e6 100644
--- a/pym/portage/checksum.py
+++ b/pym/portage/checksum.py
@@ -161,7 +161,8 @@ if False:
 
 		class GCryptHashWrapper(object):
 			def __init__(self, algo):
-				self._obj = pygcrypt.hashcontext.HashContext(algo=algo)
+				self._obj = pygcrypt.hashcontext.HashContext(algo=algo,
+						secure=False)
 
 			def update(self, data):
 				self._obj.write(data)
-- 
2.15.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] [checksum] Do not use secure memory for pygcrypt backend
  2017-12-05 20:00 [gentoo-portage-dev] [PATCH] [checksum] Do not use secure memory for pygcrypt backend Michał Górny
@ 2017-12-05 21:35 ` Zac Medico
  0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2017-12-05 21:35 UTC (permalink / raw
  To: gentoo-portage-dev, Michał Górny


[-- Attachment #1.1: Type: text/plain, Size: 933 bytes --]

On 12/05/2017 12:00 PM, Michał Górny wrote:
> Disable using secure memory for pygcrypt backend since we are not
> processing secrets. This can avoid the libgcrypt memory error; however,
> it turned out to be a huge memory/resource leak which needs to be fixed
> independently.
> ---
>  pym/portage/checksum.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py
> index 9e7bffea9..4174638e6 100644
> --- a/pym/portage/checksum.py
> +++ b/pym/portage/checksum.py
> @@ -161,7 +161,8 @@ if False:
>  
>  		class GCryptHashWrapper(object):
>  			def __init__(self, algo):
> -				self._obj = pygcrypt.hashcontext.HashContext(algo=algo)
> +				self._obj = pygcrypt.hashcontext.HashContext(algo=algo,
> +						secure=False)
>  
>  			def update(self, data):
>  				self._obj.write(data)
> 

Looks good, please merge.
-- 
Thanks,
Zac


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 224 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-05 21:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-05 20:00 [gentoo-portage-dev] [PATCH] [checksum] Do not use secure memory for pygcrypt backend Michał Górny
2017-12-05 21:35 ` Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox