Changeset 327
- Timestamp:
- 01/05/06 13:57:53
- Files:
-
- openpgpsdk/trunk/examples/packet-dump.c (modified) (1 diff)
- openpgpsdk/trunk/examples/verify2.c (modified) (1 diff)
- openpgpsdk/trunk/include/openpgpsdk/armour.h (modified) (1 diff)
- openpgpsdk/trunk/src/armour.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openpgpsdk/trunk/examples/packet-dump.c
r326 r327 907 907 908 908 if(armour) 909 ops_reader_push_dearmour(pinfo,ops_true,ops_true );909 ops_reader_push_dearmour(pinfo,ops_true,ops_true,ops_true); 910 910 911 911 ret=ops_parse(pinfo); openpgpsdk/trunk/examples/verify2.c
r320 r327 187 187 188 188 if(armour) 189 ops_reader_push_dearmour(pinfo,ops_false,ops_false );189 ops_reader_push_dearmour(pinfo,ops_false,ops_false,ops_false); 190 190 191 191 ops_parse(pinfo); openpgpsdk/trunk/include/openpgpsdk/armour.h
r320 r327 3 3 4 4 void ops_reader_push_dearmour(ops_parse_info_t *parse_info, 5 ops_boolean_t without_gap,ops_boolean_t no_gap); 5 ops_boolean_t without_gap, 6 ops_boolean_t no_gap, 7 ops_boolean_t trailing_whitespace); 6 8 7 9 void ops_reader_pop_dearmour(ops_parse_info_t *parse_info); openpgpsdk/trunk/src/armour.c
r320 r327 31 31 ops_boolean_t allow_no_gap:1; /*!< allow no blank line at the 32 32 start of armoured data */ 33 ops_boolean_t allow_trailing_whitespace:1; /*!< allow armoured 34 stuff to have 35 trailing whitespace 36 where we wouldn't 37 strictly expect it */ 33 38 34 39 // base64 stuff … … 452 457 ERR(cbinfo,"Error in checksum"); 453 458 c=read_char(arg,errors,rinfo,cbinfo,ops_true); 459 if(arg->allow_trailing_whitespace) 460 while(c == ' ' || c == '\t') 461 c=read_char(arg,errors,rinfo,cbinfo,ops_true); 454 462 if(c != '\n') 455 463 ERR(cbinfo,"Badly terminated checksum"); … … 572 580 if((c=unarmoured_read_char(arg,errors,rinfo,cbinfo,ops_true)) < 0) 573 581 return OPS_R_EOF; 582 if(arg->allow_trailing_whitespace) 583 while(c == ' ' || c == '\t') 584 if((c=unarmoured_read_char(arg,errors,rinfo,cbinfo, 585 ops_true)) < 0) 586 return OPS_R_EOF; 574 587 if(c != '\n') 575 588 /* wasn't a header line after all */ … … 698 711 699 712 void ops_reader_push_dearmour(ops_parse_info_t *parse_info, 700 ops_boolean_t without_gap,ops_boolean_t no_gap) 713 ops_boolean_t without_gap, 714 ops_boolean_t no_gap, 715 ops_boolean_t trailing_whitespace) 701 716 { 702 717 dearmour_arg_t *arg; … … 706 721 arg->allow_headers_without_gap=without_gap; 707 722 arg->allow_no_gap=no_gap; 723 arg->allow_trailing_whitespace=trailing_whitespace; 708 724 709 725 ops_reader_push(parse_info,armoured_data_reader,arg);
