summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/maptool.17
-rw-r--r--navit/maptool/maptool.c19
-rw-r--r--navit/maptool/maptool.h5
-rw-r--r--navit/maptool/zip.c34
4 files changed, 3 insertions, 62 deletions
diff --git a/man/maptool.1 b/man/maptool.1
index 4112d0b15..8705f648e 100644
--- a/man/maptool.1
+++ b/man/maptool.1
@@ -4,13 +4,13 @@ maptool \- parse osm textfile and convert to Navit binfile format
.SH SYNOPSIS
.B For OSM XML data:
.B bzcat planet.osm.bz2 | maptool mymap.bin
-[\-h] [\-5 <file>] [\-6] [\-a <level>] [\-c] -[\-d <connect string]
+[\-h] [\-6] [\-a <level>] [\-c] -[\-d <connect string]
[\-e <phase>] [\-i <file>] [\-k] [\-M] [\-N] [\-o] [\-r <file>] [\-s <phase>]
[\-S <size>] [\-w] [\-W] [\-U] [\-z <level>]
.B For OSM Protobuf/PBF data:
.B maptool \-\-protobuf \-i planet.osm.pbf planet.bin
-[\-h] [\-5 <file>] [\-6] [\-a <level>] [\-c] [\-e <phase>]
+[\-h] [\-6] [\-a <level>] [\-c] [\-e <phase>]
[\-i <file>] [\-k] [\-M] [\-N] [\-o] [\-P] [\-r <file>] [\-s <phase>]
[\-S <size>] [\-w] [\-W] [\-U] [\-z <level>]
.SH DESCRIPTION
@@ -20,9 +20,6 @@ maptool parses osm textfile and converts it to Navit binfile format
\-h (\-\-help)
display a short help message
.TP
-\-5 (\-\-md5)
-set file where to write md5 sum
-.TP
\-6 (\-\-64bit)
set zip 64 bit compression
.TP
diff --git a/navit/maptool/maptool.c b/navit/maptool/maptool.c
index 2d35fe516..b1db65eeb 100644
--- a/navit/maptool/maptool.c
+++ b/navit/maptool/maptool.c
@@ -279,7 +279,6 @@ usage(void)
fprintf(f,"maptool --protobuf -i planet.osm.pbf planet.bin\n");
fprintf(f,"Available switches:\n");
fprintf(f,"-h (--help) : this screen\n");
- fprintf(f,"-5 (--md5) <file> : set file where to write md5 sum\n");
fprintf(f,"-6 (--64bit) : set zip 64 bit compression\n");
fprintf(f,"-a (--attr-debug-level) <level> : control which data is included in the debug attribute\n");
fprintf(f,"-c (--dump-coordinates) : dump coordinates after phase 1\n");
@@ -324,7 +323,6 @@ struct maptool_params {
int process_relations;
char *protobufdb;
char *protobufdb_operation;
- char *md5file;
int start;
int end;
int dump;
@@ -357,7 +355,6 @@ parse_option(struct maptool_params *p, char **argv, int argc, int *option_index)
int pos,c,i;
static struct option long_options[] = {
- {"md5", 1, 0, '5'},
{"64bit", 0, 0, '6'},
{"attr-debug-level", 1, 0, 'a'},
{"binfile", 0, 0, 'b'},
@@ -389,7 +386,7 @@ parse_option(struct maptool_params *p, char **argv, int argc, int *option_index)
{"index-size", 0, 0, 'x'},
{0, 0, 0, 0}
};
- c = getopt_long (argc, argv, "5:6B:DEMNO:PS:Wa:bc"
+ c = getopt_long (argc, argv, "6B:DEMNO:PS:Wa:bc"
#ifdef HAVE_POSTGRESQL
"d:"
#endif
@@ -397,9 +394,6 @@ parse_option(struct maptool_params *p, char **argv, int argc, int *option_index)
if (c == -1)
return 1;
switch (c) {
- case '5':
- p->md5file=optarg;
- break;
case '6':
p->zip64=1;
break;
@@ -812,8 +806,6 @@ maptool_assemble_map(struct maptool_params *p, char *suffix, char **filenames, c
zip_set_timestamp(zip_info, p->timestamp);
zip_set_maxnamelen(zip_info, 14+strlen(suffix0));
zip_set_compression_level(zip_info, p->compression_level);
- if (p->md5file)
- zip_set_md5(zip_info, 1);
if(!zip_open(zip_info, p->result, zipdir, zipindex)) {
fprintf(stderr,"Fatal: Could not write output file.\n");
exit(1);
@@ -860,7 +852,6 @@ maptool_assemble_map(struct maptool_params *p, char *suffix, char **filenames, c
unlink("coords.tmp");
}
if (last) {
- unsigned char md5_data[16];
zipnum=zip_get_zipnum(zip_info);
add_aux_tiles("auxtiles.txt", zip_info);
write_countrydir(zip_info,p->max_index_size);
@@ -869,14 +860,6 @@ maptool_assemble_map(struct maptool_params *p, char *suffix, char **filenames, c
zip_write_index(zip_info);
zip_write_directory(zip_info);
zip_close(zip_info);
- if (p->md5file && zip_get_md5(zip_info, md5_data)) {
- FILE *md5=fopen(p->md5file,"w");
- int i;
- for (i = 0 ; i < 16 ; i++)
- fprintf(md5,"%02x",md5_data[i]);
- fprintf(md5,"\n");
- fclose(md5);
- }
if (!p->keep_tmpfiles) {
remove_countryfiles();
tempfile_unlink("index","");
diff --git a/navit/maptool/maptool.h b/navit/maptool/maptool.h
index f1f45fff7..ce147b1a4 100644
--- a/navit/maptool/maptool.h
+++ b/navit/maptool/maptool.h
@@ -23,9 +23,6 @@
#include "attr.h"
#include "geom.h"
#include "types.h"
-#ifdef HAVE_LIBCRYPTO
-#include <openssl/md5.h>
-#endif
#define sq(x) ((double)(x)*(x))
@@ -404,8 +401,6 @@ void write_zipmember(struct zip_info *zip_info, char *name, int filelen, char *d
void zip_write_index(struct zip_info *info);
int zip_write_directory(struct zip_info *info);
struct zip_info *zip_new(void);
-void zip_set_md5(struct zip_info *info, int on);
-int zip_get_md5(struct zip_info *info, unsigned char *out);
void zip_set_zip64(struct zip_info *info, int on);
void zip_set_compression_level(struct zip_info *info, int level);
void zip_set_maxnamelen(struct zip_info *info, int max);
diff --git a/navit/maptool/zip.c b/navit/maptool/zip.c
index 1a66e083a..a4e040974 100644
--- a/navit/maptool/zip.c
+++ b/navit/maptool/zip.c
@@ -25,10 +25,6 @@
#include "config.h"
#include "zipfile.h"
-#ifdef HAVE_LIBCRYPTO
-#include <openssl/md5.h>
-#endif
-
struct zip_info {
int zipnum;
int dir_size;
@@ -41,10 +37,6 @@ struct zip_info {
FILE *res2;
FILE *index;
FILE *dir;
-#ifdef HAVE_LIBCRYPTO
- MD5_CTX md5_ctx;
-#endif
- int md5;
};
static int
@@ -52,10 +44,6 @@ zip_write(struct zip_info *info, void *data, int len)
{
if (fwrite(data, len, 1, info->res2) != 1)
return 0;
-#ifdef HAVE_LIBCRYPTO
- if (info->md5)
- MD5_Update(&info->md5_ctx, data, len);
-#endif
return 1;
}
@@ -279,28 +267,6 @@ zip_new(void)
}
void
-zip_set_md5(struct zip_info *info, int on)
-{
-#ifdef HAVE_LIBCRYPTO
- info->md5=on;
- if (on)
- MD5_Init(&info->md5_ctx);
-#endif
-}
-
-int
-zip_get_md5(struct zip_info *info, unsigned char *out)
-{
- if (!info->md5)
- return 0;
-#ifdef HAVE_LIBCRYPTO
- MD5_Final(out, &info->md5_ctx);
- return 1;
-#endif
- return 0;
-}
-
-void
zip_set_zip64(struct zip_info *info, int on)
{
info->zip64=on;