[issue113] wish: gpgme_attributes_reset() to reset all attributes to default values

Marc Mutz aegypten-issues at intevation.de
Thu Mar 11 20:27:45 CET 2004


New submission from Marc Mutz <marc at klaralvdalens-datakonsult.se>:

Semantics should be equivalent to: 
gpgme_error_t gpgme_reset( gpgme_ctx_t ctx ) { 
  gpgme_ctx_t defCtx; 
  gpgme_error_t err = GPG_ERR_NO_ERROR; 
 
  err = gpgme_new( &defCtx ); 
  if ( err ) return err; 
  gpgme_set_key_list_mode( ctx, gpgme_get_key_list_mode( defCtx ) ); 
  gpgme_set_armor( ctx, gpgme_get_armor( defCtx ) ); 
  gpgme_set_textmode( ctx, gpgme_get_armor( defCtx ) ); 
  gpgme_signers_clear( ctx ); 
  /* etc etc, but _not_ the protocol */ 
 
  return err; 
} 
 
IOW: It should reset the context to the state is has when it's freshly created, 
but without requiring the tearing down of the engine inside. 
 
This is of course only really useful in an environment that has maintains a 
pool of contexts per protocol, so the planned running of gpg(sm) as a server 
can actually give the performance boost we hope for. 
 
Since it's not yet applicable, it's a wish :)

----------
messages: 502
nosy: marc
priority: wish
status: unread
title: wish: gpgme_attributes_reset() to reset all attributes to default values
topic: GPGME
______________________________________________________
Aegypten issue tracker <aegypten-issues at intevation.de>
<https://intevation.de/roundup/aegypten/issue113>
______________________________________________________



More information about the Gpa-dev mailing list