/[marvin]/marvin/src/gui/decrypt.cc
ViewVC logotype

Diff of /marvin/src/gui/decrypt.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by castor_fou, Tue Sep 16 20:25:36 2003 UTC revision 1.4 by castor_fou, Wed Sep 17 02:09:04 2003 UTC
# Line 83  int decrypt_file(std::string path, std:: Line 83  int decrypt_file(std::string path, std::
83    GPG_PASSPHRASE = passphrase.c_str();    GPG_PASSPHRASE = passphrase.c_str();
84    
85    err = gpgme_new (&ctx);    err = gpgme_new (&ctx);
86    if (err) exit(1);    if (err) return (1);
87    if ( !getenv("GPG_AGENT_INFO") )    if ( !getenv("GPG_AGENT_INFO") )
88      {      {
89        memset ( &info, 0, sizeof info );        memset ( &info, 0, sizeof info );
# Line 94  int decrypt_file(std::string path, std:: Line 94  int decrypt_file(std::string path, std::
94      }      }
95    
96    err = gpgme_data_new_from_file ( &in, path.c_str(), 1);    err = gpgme_data_new_from_file ( &in, path.c_str(), 1);
97    if (err) exit(1);    if (err) return (1);
98    
99    err = gpgme_data_new ( &out );    err = gpgme_data_new ( &out );
100    if (err) exit(1);    if (err) return (1);
101    
102    err = gpgme_op_decrypt (ctx, in, out );    err = gpgme_op_decrypt (ctx, in, out );
103    
104    if (err)    if (err)
105      {      return(1);
       return(0);  
     }  
106    
107    fflush (NULL);    fflush (NULL);
108    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26