/[winpt]/trunk/Src/wptKeyCache.cpp
ViewVC logotype

Diff of /trunk/Src/wptKeyCache.cpp

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

revision 260 by twoaday, Wed Aug 16 10:01:30 2006 UTC revision 340 by twoaday, Sun Nov 27 13:15:07 2011 UTC
# Line 1  Line 1 
1  /* wptKeyCache.cpp- Caching for the pub- and the secring  /* wptKeyCache.cpp- Caching for the pub- and the secring
2   *      Copyright (C) 2001-2006 Timo Schulz   *      Copyright (C) 2001-2006, 2009 Timo Schulz
3   *   *
4   * This file is part of WinPT.   * This file is part of WinPT.
5   *   *
# Line 12  Line 12 
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU General Public License for more details.   * GNU General Public License for more details.
  *  
  * You should have received a copy of the GNU General Public License  
  * along with this program; if not, write to the Free Software  
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA  
15   */   */
16    
17  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
# Line 55  struct attr_list_s { Line 51  struct attr_list_s {
51  typedef struct attr_list_s *attr_list_t;  typedef struct attr_list_s *attr_list_t;
52    
53    
 /* XXX: convert it to an inline function and place it in a header file. */  
54  static unsigned char*  static unsigned char*
55  safe_uchar_alloc (size_t n)  safe_uchar_alloc (size_t n)
56  {  {
# Line 67  safe_uchar_alloc (size_t n) Line 62  safe_uchar_alloc (size_t n)
62    
63    
64  /* Free attribute list @ctx. */  /* Free attribute list @ctx. */
65  void  static void
66  free_attr_list (attr_list_t ctx)  free_attr_list (attr_list_t ctx)
67  {  {
68      attr_list_t n;      attr_list_t n;
# Line 163  parse_attr_data (const char *keyid, attr Line 158  parse_attr_data (const char *keyid, attr
158          fwrite (status, 1, strlen (status), tmp);          fwrite (status, 1, strlen (status), tmp);
159          fflush (tmp);          fflush (tmp);
160          rewind (tmp);          rewind (tmp);
   
161          ndata = parse_attr_list (tmp, data, ndata, list);          ndata = parse_attr_list (tmp, data, ndata, list);
         fclose (tmp);  
         DeleteFile (tmpnam);  
162      }      }
163      else      else
164          *list = NULL;          *list = NULL;
165        if (tmp != NULL) {
166            fclose (tmp);
167            DeleteFile (tmpnam);
168        }
169    
170      safe_free (status);      safe_free (status);
171      safe_free (data);      safe_free (data);
# Line 1016  gpg_keycache_get_default_key (gpg_keycac Line 1012  gpg_keycache_get_default_key (gpg_keycac
1012  }  }
1013    
1014    
1015    /* FIXME: rewrite the subpacket part */
1016    void unhexify_buffer (const char *in, char **r_out);
1017    
1018  static gpgme_error_t  static gpgme_error_t
1019  decode_subpacket (const char *subpkt_data, int *type,  decode_subpacket (const char *subpkt_data, int *type,
1020                    char **out, WORD *outlen)                    char **out, WORD *outlen)

Legend:
Removed from v.260  
changed lines
  Added in v.340

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26