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

Marc Mutz <[email protected]>
Newsgroups gmane.comp.encryption.gpg.gpa.devel
Message-ID <[email protected]>
New submission from Marc Mutz <[email protected]>:

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 <[email protected]>
<https://intevation.de/roundup/aegypten/issue113>
______________________________________________________
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.