~ubuntu-branches/ubuntu/hardy/gnupg/hardy-updates

« back to all changes in this revision

Viewing changes to g10/keyserver.c

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2006-12-12 15:56:56 UTC
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20061212155656-kk00wp4x0uq4tm1y
Tags: upstream-1.4.6
ImportĀ upstreamĀ versionĀ 1.4.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
1187
1187
 
1188
1188
        for(key=list;key!=NULL;key=key->next)
1189
1189
          {
1190
 
            armor_filter_context_t afx;
 
1190
            armor_filter_context_t *afx;
1191
1191
            IOBUF buffer=iobuf_temp();
1192
1192
            KBNODE block;
1193
1193
 
1194
1194
            temp=NULL;
1195
1195
            add_to_strlist(&temp,key->d);
1196
1196
 
1197
 
            memset(&afx,0,sizeof(afx));
1198
 
            afx.what=1;
 
1197
            afx = new_armor_context ();
 
1198
            afx->what = 1;
1199
1199
            /* Tell the armor filter to use Unix-style \n line
1200
1200
               endings, since we're going to fprintf this to a file
1201
1201
               that (on Win32) is open in text mode.  The win32 stdio
1202
1202
               will transform the \n to \r\n and we'll end up with the
1203
1203
               proper line endings on win32.  This is a no-op on
1204
1204
               Unix. */
1205
 
            afx.eol[0]='\n';
1206
 
            iobuf_push_filter(buffer,armor_filter,&afx);
 
1205
            afx->eol[0]='\n';
 
1206
            push_armor_filter (afx, buffer);
 
1207
            release_armor_context (afx);
1207
1208
 
1208
1209
            /* TODO: Remove Comment: lines from keys exported this
1209
1210
               way? */
1313
1314
                        (ulong)block->pkt->pkt.public_key->keyid[0],
1314
1315
                        (ulong)block->pkt->pkt.public_key->keyid[1]);
1315
1316
 
1316
 
                fprintf(spawn->tochild,"KEY %s BEGIN\n",key->d);
 
1317
                fprintf(spawn->tochild,"KEY %08lX%08lX BEGIN\n",
 
1318
                        (ulong)block->pkt->pkt.public_key->keyid[0],
 
1319
                        (ulong)block->pkt->pkt.public_key->keyid[1]);
1317
1320
                fwrite(iobuf_get_temp_buffer(buffer),
1318
1321
                       iobuf_get_temp_length(buffer),1,spawn->tochild);
1319
 
                fprintf(spawn->tochild,"KEY %s END\n",key->d);
 
1322
                fprintf(spawn->tochild,"KEY %08lX%08lX END\n",
 
1323
                        (ulong)block->pkt->pkt.public_key->keyid[0],
 
1324
                        (ulong)block->pkt->pkt.public_key->keyid[1]);
1320
1325
 
1321
1326
                iobuf_close(buffer);
1322
1327