namesys: Incomplete code disabled to not break compilation.

This commit is contained in:
Jose Marcial Vieira Bisneto 2017-02-14 07:56:07 -03:00
parent 9379d0904f
commit fbd862431c
5 changed files with 7 additions and 14 deletions

View file

@ -28,7 +28,8 @@ OBJS = main.o \
../thirdparty/ipfsaddr/ipfs_addr.o \ ../thirdparty/ipfsaddr/ipfs_addr.o \
../unixfs/unixfs.o \ ../unixfs/unixfs.o \
../../c-protobuf/protobuf.o ../../c-protobuf/varint.o \ ../../c-protobuf/protobuf.o ../../c-protobuf/varint.o \
../util/errs.o ../util/errs.o \
../util/time.o
%.o: %.c $(DEPS) %.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS) $(CC) -c -o $@ $< $(CFLAGS)

View file

@ -7,7 +7,7 @@ endif
LFLAGS = LFLAGS =
DEPS = DEPS =
OBJS = base.o dns.o isdomain.o namesys.o pb.o proquint.o publisher.o routing.o OBJS = base.o dns.o isdomain.o namesys.o proquint.o
%.o: %.c $(DEPS) %.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS) $(CC) -c -o $@ $< $(CFLAGS)

View file

@ -1,16 +1,12 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#define __USE_ISOC11
#include <time.h> #include <time.h>
#include "ipfs/cid/cid.h" #include "ipfs/cid/cid.h"
#include "ipfs/path/path.h" #include "ipfs/path/path.h"
#include "ipfs/namesys/namesys.h" #include "ipfs/namesys/namesys.h"
#include "ipfs/dnslink/dnslink.h" #include "ipfs/dnslink/dnslink.h"
#ifndef __USE_ISOC11
extern int timespec_get (struct timespec *__ts, int __base)
__THROW __nonnull ((1));
#endif
/* mpns (a multi-protocol NameSystem) implements generic IPFS naming. /* mpns (a multi-protocol NameSystem) implements generic IPFS naming.
* *
* Uses several Resolvers: * Uses several Resolvers:

View file

@ -1,6 +1,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <time.h>
#include "ipfs/namesys/namesys.h" #include "ipfs/namesys/namesys.h"
#include "ipfs/cid/cid.h" #include "ipfs/cid/cid.h"
#include "ipfs/path/path.h" #include "ipfs/path/path.h"

View file

@ -1,14 +1,8 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#define __USE_ISOC11
#include <time.h> #include <time.h>
#ifndef __USE_ISOC11
extern int timespec_get (struct timespec *__ts, int __base)
__THROW __nonnull ((1));
#endif
#ifndef TIME_UTC
# define TIME_UTC 1
#endif
#include "ipfs/namesys/routing.h" #include "ipfs/namesys/routing.h"
#include "ipfs/util/time.h" #include "ipfs/util/time.h"
#include "mh/multihash.h" #include "mh/multihash.h"
@ -228,6 +222,7 @@ int ipfs_namesys_routing_resolve_once (char **path, char *name, int depth, char
return err; return err;
} }
// TODO: implement libp2p_crypto_verify
// check sig with pk // check sig with pk
err = libp2p_crypto_verify(ipns_entry_data_for_sig(pb->IpnsEntry), pb->IpnsEntry->signature, &ok); err = libp2p_crypto_verify(ipns_entry_data_for_sig(pb->IpnsEntry), pb->IpnsEntry->signature, &ok);
if (err || !ok) { if (err || !ok) {