Commit Graph

5316 Commits

Author SHA1 Message Date
csoler
09f92642d6
removed memory leak in gxsnettunnel 2018-11-06 20:55:10 +01:00
csoler
f976e1c525
removed memory leak in handlign of old chat lobby items 2018-11-06 20:38:35 +01:00
Gioacchino Mazzurco
a3c81e163d
Fix compilation for ubuntu 18.04 LTS
Ubuntu 18.04 still ships OpenSSL 1.1.0g which has bugs in BIO API, this
commit work around those bugs
2018-11-06 13:02:56 +01:00
Gioacchino Mazzurco
d00d0816ff
Use only BIO_METHOD pointer in openssl >= 1.1.0
The type declaration is hidden so we can't declare variable but only
pointers
Fix compilation on Android
2018-11-05 23:39:10 +01:00
Gioacchino Mazzurco
18e02c9f4a
TOU avoid forging BIO_METHOD in openssl >= 1.1.0
Forging of BIO_METHOD may be the cause of the stack overflow as the
internal structure in openssl changed so the methods get assigned to
wrong pointer.
Kudos Cyril to notice newer openssl internal struct had one new pointer
inserted as second member
2018-11-05 22:23:40 +01:00
sehraf
66dff9bf0b
Add a build-time switch to set whether GXS distributes all available data or only sends data withint the configured sync period. 2018-11-05 18:56:11 +01:00
Gioacchino Mazzurco
81cad2ab02
Fix missing include 2018-11-05 14:02:44 +01:00
Gioacchino Mazzurco
1ef9876610
Merge branch 'stacktrace_on_crash' into hotfix_udp_crash 2018-11-05 00:20:33 +01:00
Gioacchino Mazzurco
c0ca1a5aad
Print stack trace on crash 2018-11-05 00:19:45 +01:00
Gioacchino Mazzurco
7d6fba7e8c
Attempt to fix crash in pqissludp
Caused by unneeded pointer usages + not enough careful IPv6 porting

I haven't managed to reproduce the crash nor to test the fix due it
happening only when UDP relayed connection happens (apparently never on
my nodes.

I have managed to discover where the bug comes from thanks to multiple
user reports, specially to Ilario report which documented 3 crashes
happening on 0.6.4 with complete log.
2018-11-04 00:09:28 +01:00
Gioacchino Mazzurco
eca4f8adf7
JSON API to check if PGP id is friend 2018-11-01 23:26:42 +01:00
csoler
4aedfddb9f
fixed bug in GRouter failing to set proper service ID in return receipts 2018-11-01 22:10:17 +01:00
csoler
33b39a8be6
removed uninitialized memory read in determination of own IP 2018-11-01 22:05:22 +01:00
csoler
cb5d247565
removed unnecessry debug output from pqissl 2018-11-01 21:45:59 +01:00
csoler
eb078d462e
added more info to deserialization warning in rsrecogn 2018-11-01 21:42:07 +01:00
csoler
3c6dd1af1c
removed unnecessary saving of config in p3turtle 2018-10-28 17:45:21 +01:00
csoler
20391371c7
fixed bug causing some GXS sync tunnels to remain unused and prevent new tunnels to be created 2018-10-28 17:29:48 +01:00
Gioacchino Mazzurco
e5805e9047
Avoid external port being reset without necessity
Fix RetroSahre behaviour when manually configured external port is
  different to local port
2018-10-24 05:39:31 +02:00
Phenom
358f27be06 Fix warnings in MessagePage.cpp
/retroshare-gui/src/gui/settings/MessagePage.cpp:62:19: warning:
deleting object of polymorphic class type 'Rs::Msgs::MsgTagType' which
has non-virtual destructor might cause undefined behavior [-Wdelete-non-
virtual-dtor]
/retroshare-gui/src/gui/settings/MessagePage.cpp:62: warning: delete
called on non-final 'Rs::Msgs::MsgTagType' that has virtual functions
but non-virtual destructor
/retroshare-gui/src/gui/settings/MessagePage.cpp:86: warning: use of
old-style cast
/retroshare-gui/src/gui/settings/MessagePage.cpp:172: warning: zero as
null pointer constant
/retroshare-gui/src/gui/settings/MessagePage.cpp:176: warning: implicit
conversion changes signedness: 'int' to 'uint32_t' (aka 'unsigned int')
/retroshare-gui/src/gui/settings/MessagePage.cpp:203: warning: zero as
null pointer constant
/retroshare-gui/src/gui/settings/MessagePage.cpp:207: warning: implicit
conversion changes signedness: 'int' to 'uint32_t' (aka 'unsigned int')
/retroshare-gui/src/gui/settings/MessagePage.cpp:261: warning: implicit
conversion changes signedness: 'int' to 'uint32_t' (aka 'unsigned int')

/libretroshare/src/retroshare/rsmsgs.h:168: warning:
'Rs::Msgs::MessageInfo' has virtual functions but non-virtual destructor
/libretroshare/src/retroshare/rsmsgs.h:168: warning: 'MessageInfo' has
no out-of-line virtual method definitions; its vtable will be emitted in
every translation unit
/libretroshare/src/retroshare/rsmsgs.h:234: warning:
'Rs::Msgs::MsgInfoSummary' has virtual functions but non-virtual
destructor
/libretroshare/src/retroshare/rsmsgs.h:234: warning: 'MsgInfoSummary'
has no out-of-line virtual method definitions; its vtable will be
emitted in every translation unit
/libretroshare/src/retroshare/rsmsgs.h:261: warning:
'Rs::Msgs::MsgTagInfo' has virtual functions but non-virtual destructor
/libretroshare/src/retroshare/rsmsgs.h:328: warning: 'ChatId' has
virtual functions but non-virtual destructor
/libretroshare/src/retroshare/rsmsgs.h:400: warning: 'ChatLobbyInvite'
has virtual functions but non-virtual destructor
/libretroshare/src/retroshare/rsmsgs.h:420: warning:
'VisibleChatLobbyRecord' has virtual functions but non-virtual
destructor
/libretroshare/src/retroshare/rsmsgs.h:420: warning:
'VisibleChatLobbyRecord' has no out-of-line virtual method definitions;
its vtable will be emitted in every translation unit
/libretroshare/src/retroshare/rsmsgs.h:449: warning: 'ChatLobbyInfo' has
virtual functions but non-virtual destructor
/libretroshare/src/retroshare/rsmsgs.h:486: warning: 'RsMsgs' has no
out-of-line virtual method definitions; its vtable will be emitted in
every translation unit

About vtable:
https://stackoverflow.com/questions/23746941/what-is-the-meaning-of-
clangs-wweak-vtables
https://stackoverflow.com/questions/50463374/avoid-weak-vtable-warnings-
for-classes-only-defined-in-a-source-file
2018-10-23 17:43:01 +02:00
Phenom
da6778934d Fix Warnings in rsloginhandler.cc
/libretroshare/src/rsserver/rsloginhandler.cc:122:2: warning: missing
initializer for member 'SecretSchema::reserved' [-Wmissing-field-
initializers]
/libretroshare/src/rsserver/rsloginhandler.cc:122:2: warning: missing
initializer for member 'SecretSchema::reserved1' [-Wmissing-field-
initializers]
/libretroshare/src/rsserver/rsloginhandler.cc:122:2: warning: missing
initializer for member 'SecretSchema::reserved2' [-Wmissing-field-
initializers]
/libretroshare/src/rsserver/rsloginhandler.cc:122:2: warning: missing
initializer for member 'SecretSchema::reserved3' [-Wmissing-field-
initializers]
/libretroshare/src/rsserver/rsloginhandler.cc:122:2: warning: missing
initializer for member 'SecretSchema::reserved4' [-Wmissing-field-
initializers]
/libretroshare/src/rsserver/rsloginhandler.cc:122:2: warning: missing
initializer for member 'SecretSchema::reserved5' [-Wmissing-field-
initializers]
/libretroshare/src/rsserver/rsloginhandler.cc:122:2: warning: missing
initializer for member 'SecretSchema::reserved6' [-Wmissing-field-
initializers]
/libretroshare/src/rsserver/rsloginhandler.cc:122:2: warning: missing
initializer for member 'SecretSchema::reserved7' [-Wmissing-field-
initializers]
/libretroshare/src/rsserver/rsloginhandler.cc:34: warning: zero as null
pointer constant
/libretroshare/src/rsserver/rsloginhandler.cc:55: warning: zero as null
pointer constant
/libretroshare/src/rsserver/rsloginhandler.cc:120: warning: use of old-
style cast
/libretroshare/src/rsserver/rsloginhandler.cc:122: warning: missing
field 'reserved' initializer
/libretroshare/src/rsserver/rsloginhandler.cc:243: warning: zero as null
pointer constant
/libretroshare/src/rsserver/rsloginhandler.cc:244: warning: zero as null
pointer constant
/libretroshare/src/rsserver/rsloginhandler.cc:248: warning: zero as null
pointer constant
/libretroshare/src/rsserver/rsloginhandler.cc:254: warning: zero as null
pointer constant
/libretroshare/src/rsserver/rsloginhandler.cc:443: warning: 'return'
will never be executed
/libretroshare/src/rsserver/rsloginhandler.cc:270: warning: 'return'
will never be executed
/libretroshare/src/rsserver/rsloginhandler.cc:468: warning: zero as null
pointer constant
/libretroshare/src/rsserver/rsloginhandler.cc:470: warning: use of old-
style cast
/libretroshare/src/rsserver/rsloginhandler.cc:470: warning: cast from
'const char *' to 'char *' drops const qualifier
/libretroshare/src/rsserver/rsloginhandler.cc:471: warning: use of old-
style cast
/libretroshare/src/rsserver/rsloginhandler.cc:471: warning: cast from
'const char *' to 'char *' drops const qualifier
/libretroshare/src/rsserver/rsloginhandler.cc:472: warning: zero as null
pointer constant
/libretroshare/src/rsserver/rsloginhandler.cc:476: warning: zero as null
pointer constant
/libretroshare/src/rsserver/rsloginhandler.cc:630: warning: 'return'
will never be executed
/libretroshare/src/rsserver/rsloginhandler.cc:650: warning: zero as null
pointer constant
/libretroshare/src/rsserver/rsloginhandler.cc:651: warning: zero as null
pointer constant
/libretroshare/src/rsserver/rsloginhandler.cc:655: warning: zero as null
pointer constant
2018-10-23 17:37:19 +02:00
Gioacchino Mazzurco
e746b5b4a0
JSON API unauthenticated access to /rsAccounts/getCurrentAccountId 2018-10-22 00:24:02 +02:00
Gioacchino Mazzurco
6543d713e4
JSON API import/export PGP key to file 2018-10-21 17:12:13 +02:00
Gioacchino Mazzurco
7a1375ff6f
rsPeers add few JSON API calls 2018-10-20 21:13:10 +02:00
csoler
cfe95a57a0
Merge pull request #1377 from G10h4ck/jsonapi
GXS deep search notify results also of already known groups
2018-10-20 14:47:37 +02:00
Gioacchino Mazzurco
2d497d7303
Fix compilation with deep search and rm dead code 2018-10-20 14:07:39 +02:00
Gioacchino Mazzurco
aca29e3ea7
Merge branch 'v0.6-GxsFix2' of https://github.com/csoler/RetroShare into csoler-v0.6-GxsFix2 2018-10-20 13:51:11 +02:00
Gioacchino Mazzurco
5699d81ae7
GXS deep search notify results also of known groups 2018-10-20 13:48:16 +02:00
Gioacchino Mazzurco
9e2c4ce49e
JSON API authorize token in createLocation
Solve uncoherent 401 behaviour at first use without login
2018-10-19 15:10:15 +02:00
Gioacchino Mazzurco
945775e9f5
Fix deep search compiling on 32bit time_t targets 2018-10-18 04:27:30 +02:00
csoler
9b4c48c540
created a connexion between token and meta data of created posts and grps 2018-10-16 22:40:27 +02:00
Gioacchino Mazzurco
2bb24075c4
Print warning also when serializing negative rstime_t 2018-10-16 16:19:23 +02:00
G10h4ck
03cdd6c7b6
Merge pull request #1363 from G10h4ck/jsonapi
New cross-platform target retroshare-service
2018-10-16 16:06:09 +02:00
thunder2
6e1de5b5ed Fixed Windows compile with MinGW 2018-10-14 15:28:20 +02:00
csoler
fae02741d4
Merge pull request #1370 from sehraf/pr_remove-debug-output
remove debug output
2018-10-14 15:00:09 +02:00
csoler
74022a5e10
fixed bug in recent commit that broke turtle generic search 2018-10-13 22:59:26 +02:00
Gioacchino Mazzurco
15b729b35c
Fix crash in p3Peers::loadCertificateFromString
This function is part of the public API so it must be safe to call with
any input, before this commit if would crash if feeded with a broken or
empty certificate radix string.
2018-10-12 22:28:44 +02:00
csoler
9c90b32def
fixed dangerous memcpy in RsTurtleGenericSearchResultItem::clone() function 2018-10-12 22:19:07 +02:00
sehraf
e6febe0297
remove debug output 2018-10-12 18:20:55 +02:00
Gioacchino Mazzurco
fc14300b06
Re-add ftServer::requestDirDetails implementation
The implementation has disappeared merging master causing linking error
2018-10-10 23:43:01 +02:00
Gioacchino Mazzurco
b3d73ba6a5
Suppress aliasing warning in DirDetails and DirStub
Order of serialization doesn't matter ATM as we use those only for
  JSON API.
Those classes should be rewritten anyway with proper naming of the
  memebers and using std::uintptr_t instead of void* and rstime_t for
  timestamps
2018-10-10 23:32:32 +02:00
G10h4ck
047ae7f723
Merge branch 'master' into jsonapi 2018-10-10 22:23:28 +02:00
csoler
18eee374f1
Merge pull request #1361 from sehraf/pr_jsonfy-rsMsg
[jsonapi] add most remaining functions of rsMsg
2018-10-10 22:04:32 +02:00
csoler
09b109d522
Merge pull request #1364 from G10h4ck/safer_time
Use safer rstime_t instead of time_t
2018-10-10 22:03:51 +02:00
Gioacchino Mazzurco
a47eec14e4
Print a warning if deserialized rstime_t is negative 2018-10-10 21:54:50 +02:00
Gioacchino Mazzurco
321fc8a8d4
Implement mostly decent JSON API for channels and post creation
Now the possible id of the cannel/post is returned and channel/post is
indexed on creation without having to wait for gxsutil scan to happen

Note that the id is correct in normal usage, but if one try to overload
the API per eventually get the id of another channel/post with same data
but created by a different call, it is not dangerous so one trying to
overload the API is just getting a possibly wrong but equivalent
channel/post id returned.
2018-10-10 06:40:56 +02:00
Gioacchino Mazzurco
c05c376351
Expose /rsFiles/requestDirDetails via JSON API
This method is useful to browse own shared directries, or directries
shared by friends whith browseable permission
2018-10-09 22:58:17 +02:00
Gioacchino Mazzurco
2139090f5d
Fix bug in JSON t_RsFlags32 deserialization
If the member was not present in the JSON it was zeroed while it should
be left untouched in that case.
This was discovered because in JSON API defualt argument value for
methods wasn't onored for t_RsFlags32 arguments.
2018-10-09 22:43:15 +02:00
Gioacchino Mazzurco
74129f670a
jsonwrappersincl target always fails if doxygen fail 2018-10-09 18:06:21 +02:00
Gioacchino Mazzurco
7798e50123
Expose JSON API for ForceDirectoryCheck 2018-10-09 11:34:57 +02:00
Gioacchino Mazzurco
406822b5ec
Expose JSON API for file filtering 2018-10-09 11:34:56 +02:00
Gioacchino Mazzurco
a89c29030a
Add missing rstime include in jsonapi 2018-10-08 11:56:47 +02:00
hunbernd
b7d5944b9c Fix building error about losing precision on Win x64 2018-10-07 21:53:16 +02:00
Gioacchino Mazzurco
ddf3164545
Fix ctime(&rstime_t) error on windows
rstime_t not neccesary in those cases so use plain time_t instead
2018-10-07 14:41:13 +02:00
Gioacchino Mazzurco
329050a9c2
Use safer rstime_t instead of time_t
Avoid problems to serialization on different platforms, without breaking
nested STL containers serialization.

The conversion have been made with sed, and checked with grep, plus
kdiff3 visual ispection, plus rutime tests, so it should be fine.
2018-10-07 13:07:06 +02:00
sehraf
137bd9cd6d
jsonapi: fix nested std types 2018-10-06 23:50:29 +02:00
Gioacchino Mazzurco
f5158b3a9f
Allow CORS in JsonApiServer 2018-10-06 18:57:14 +02:00
Gioacchino Mazzurco
8f17270a2a
Fix type in .pri breaking non-cross-compiling 2018-10-06 18:49:17 +02:00
csoler
586cff2ad1
Merge pull request #1362 from csoler/v0.6-ImprovedGUI
V0.6 improved gui
2018-10-06 18:33:13 +02:00
csoler
045691855b
Merge pull request #1356 from PhenomRetroShare/Fix_Warnings
Fix warnings
2018-10-06 18:31:33 +02:00
Gioacchino Mazzurco
2b3570903f
retroshare-service deep search support for Android 2018-10-06 01:23:08 +02:00
Gioacchino Mazzurco
b28512b889
retroshare-service now build and runs fine on android (even older ones) 2018-10-05 22:29:49 +02:00
csoler
ec8e8ebafa
fixed merging with upstream/master 2018-10-05 21:38:36 +02:00
csoler
dbd52c0c9c
fixed bug in previous commit 2018-10-05 17:01:54 +02:00
csoler
4de0498208
fixed bad signature checking code for config files 2018-10-05 16:54:36 +02:00
Gioacchino Mazzurco
1d8bb44811
Fix warnings 2018-10-05 01:55:18 +02:00
Gioacchino Mazzurco
341a68ce07
rstypeserializer fix uninitialized variable usage 2018-10-05 01:23:17 +02:00
Gioacchino Mazzurco
321d2e84bd
gxschannel expose blocking create post and channels API 2018-10-04 23:36:01 +02:00
sehraf
6dabb81dc0
rsMsg: unify parameter name 2018-10-04 23:25:23 +02:00
sehraf
500eb7f518
jsonapi: add rsMsg tagging functions 2018-10-04 23:24:06 +02:00
sehraf
897c8e0a8a
jsonapi: more rsMsg functions 2018-10-04 22:43:13 +02:00
sehraf
70678ad508
jsonapi: fix std::map<T,U> 2018-10-04 22:43:13 +02:00
sehraf
150af40e09
jsonapi: convert and add getMessageCount 2018-10-04 22:43:12 +02:00
sehraf
285158db5f
jsonapi: access messages (mail) 2018-10-04 22:43:12 +02:00
csoler
c6d0203557
added debug output to see which config files are loaded/saved 2018-10-04 19:22:49 +02:00
csoler
fb21e427be
removed saving of GxsTrans configuration in class destructor, causing lock up when quitting RS 2018-10-04 19:14:21 +02:00
Gioacchino Mazzurco
7c986b926d
Remove overloaded GetRetroshareInvite method
now the original method has default paramether that return invite for
  own node, this way JSON API is more friendly
2018-10-04 19:14:16 +02:00
Gioacchino Mazzurco
7cc15c703c
Fix forward declarations class struct missmatch 2018-10-03 19:07:46 +02:00
Gioacchino Mazzurco
e6e5700ed6
Fix warning caused by clang defining _GNUC_ 2018-10-03 19:07:46 +02:00
Gioacchino Mazzurco
8f3f2cd7cb
retroshare-service improve building process 2018-10-03 15:53:18 +02:00
csoler
81fc3b7921
select GxsIds as default list to chose msg destination from 2018-10-03 15:25:53 +02:00
Phenom
6ef72f551d Fix Gcc Warning in authssl.cc
/libretroshare/src/pqi/authssl.cc:160: warning: ‘void
dyn_destroy_function(CRYPTO_dynlock_value*, const char*, int)’ defined
but not used [-Wunused-function]
 static void dyn_destroy_function(struct CRYPTO_dynlock_value *l, const
char */*file*/, int /*line*/)
/libretroshare/src/pqi/authssl.cc:143: warning: ‘void
dyn_lock_function(int, CRYPTO_dynlock_value*, const char*, int)’ defined
but not used [-Wunused-function]
 static void dyn_lock_function(int mode, struct CRYPTO_dynlock_value *l,
const char */*file*/, int /*line*/)
/libretroshare/src/pqi/authssl.cc:121: warning: ‘CRYPTO_dynlock_value*
dyn_create_function(const char*, int)’ defined but not used [-Wunused-
function]
 static struct CRYPTO_dynlock_value *dyn_create_function(const char */
*file*/, int /*line*/)
/libretroshare/src/pqi/authssl.cc:106: warning: ‘long unsigned int
id_function()’ defined but not used [-Wunused-function]
 static unsigned long id_function(void)
/libretroshare/src/pqi/authssl.cc:92: warning: ‘void
locking_function(int, int, const char*, int)’ defined but not used [-
Wunused-function]
 static void locking_function(int mode, int n, const char */*file*/, int
/*line*/)
2018-09-30 15:10:40 +02:00
Phenom
1839d23df1 Fix Gcc Warning hashstream.h
/libretroshare/src/crypto/hashstream.cc:38: warning: friend declaration
‘template<class T> librs::crypto::HashStream&
librs::crypto::operator<<(librs::crypto::HashStream&, const T&)’ is not
visible to explicit specialization
  HashStream& operator<<(HashStream& u,const std::string& s)
/libretroshare/src/crypto/hashstream.cc:44: warning: friend declaration
‘template<class T> librs::crypto::HashStream&
librs::crypto::operator<<(librs::crypto::HashStream&, const T&)’ is not
visible to explicit specialization
  HashStream& operator<<(HashStream& u,const uint64_t& n)
/libretroshare/src/crypto/hashstream.cc:58: warning: friend declaration
‘template<class T> librs::crypto::HashStream&
librs::crypto::operator<<(librs::crypto::HashStream&, const T&)’ is not
visible to explicit specialization
  HashStream& operator<<(HashStream& u,const uint32_t& n)
/libretroshare/src/crypto/hashstream.cc:72: warning: friend declaration
‘template<class T> librs::crypto::HashStream&
librs::crypto::operator<<(librs::crypto::HashStream&, const T&)’ is not
visible to explicit specialization
  HashStream& operator<<(HashStream& u,const uint8_t& n)
2018-09-30 15:10:40 +02:00
csoler
79a8b2183f
Merge pull request #1353 from csoler/v0.6-FileLists
V0.6 file lists
2018-09-30 13:31:26 +02:00
csoler
443dbdfbef
fixed small bug breaking display of flat mode in files 2018-09-29 19:04:23 +02:00
Gioacchino Mazzurco
0078501dba
Initial work on a RetroShare cross-platform service
This doesn't need any interacion of the user at startup, unlike
retroshare-nogui which requires the user to login on the shell this doesn't
even need a TTY.
At startup this just parse command line, read the PGP keyring, look for
available locations, and start listening for JSON API requests.
Another difference with retroshare-nogui is that this is capable to
generate/import PGP identities, generate locations, and in general anything
possible through the RetroShare API.
retroshare-service is suitable also to run it as a system service, even
in very constrained systems such as Android ot a Docker container.
retroshare-service drop support for libresapi so only the new JSON API
is exposed, it will completely obsolete retroshare-android-service once
retroshare-qml-app is ported to the new JSON API.
2018-09-29 00:15:10 +02:00
csoler
752275f813
fixed various display bugs in extra file list 2018-09-27 22:14:00 +02:00
csoler
54ec49dc03
make extra shared file list appear only when non empty 2018-09-27 21:56:41 +02:00
csoler
e1698429de
fixed display of size 2018-09-27 21:46:00 +02:00
csoler
2610f62e41
fixed display of temporary shared file text 2018-09-27 21:42:21 +02:00
csoler
c77a28c17a
added proper notification when removing an extra file 2018-09-27 21:20:06 +02:00
csoler
7ab7c7db93
added possibility to remove extra shared file 2018-09-27 16:53:08 +02:00
csoler
1383846364
added extra list view in own files. 2018-09-27 13:42:49 +02:00
Phenom
aec68c2269 Fix qmake double using retroshare.pri
From 544b4af4c2
2018-09-26 17:55:58 +02:00
Phenom
f420bb4644 Fix qmake warnings:
Makefile.libretroshare:3811: warning: overriding recipe for target
'temp/linux-g++/obj/hashstream.o'
Makefile.libretroshare:3772: warning: ignoring old recipe for target
'temp/linux-g++/obj/hashstream.o'
2018-09-26 17:36:33 +02:00
G10h4ck
f09bef2ac8
Merge pull request #1349 from G10h4ck/jsonapi
Implement JSON API HTTP Basic authentication
2018-09-25 18:10:16 +02:00
Gioacchino Mazzurco
95e0fd338f
JsonApiServer::isAuthTokenValid avoid timing attack
Thanks Cyril for review :)
2018-09-25 17:27:54 +02:00
Gioacchino Mazzurco
1c7f02655e
Fix crash at startup if jsonapi not enabled 2018-09-21 01:40:26 +02:00
Gioacchino Mazzurco
bf98166197
RsServer fix crash on stop if shutdown callback not set 2018-09-21 01:39:48 +02:00
zapek
dc926d30c8 links with wsock32 only if the jsonapi is built 2018-09-20 23:29:36 +02:00
zapek
458a8b0878 fixed JSONAPI build for Windows 2018-09-20 22:24:05 +02:00
Gioacchino Mazzurco
add97dede0
p3face include jsonapi.h only if enabled 2018-09-19 22:02:07 +02:00
Gioacchino Mazzurco
eb77f921ec
Implement JSON API HTTP Basic authentication
jsonapi-generator is now capable of generating API for headers outside
  retroshare/ directory
jsonapi-generator do a bit of methods parameter sanity check
JsonApiServer is now integrated in the rsinit hell like other services
Add *::exportGPGKeyPairToString to a bunch of classes in cascade
RsControl is now capable of calling back a function when retroshare is almost
  completely stopped, this is useful when running retroshare toghether with
  externally managed runloop such as QCoreApplication
Expose a bunch of methods through JSON API
retroshare-nogui remove some dead code and fix stopping from the RetroShare API
2018-09-19 21:28:26 +02:00
Gioacchino Mazzurco
43bc80de8e
JSON API export version extra too 2018-09-15 21:53:46 +02:00
Gioacchino Mazzurco
cd03953b1a
Provide meaningful devault value in rsversion.h 2018-09-15 21:07:03 +02:00
hunbernd
05537d89cb Added warning instead of running the version_detail script 2018-09-15 18:27:15 +02:00
G10h4ck
eece958aa0
Merge pull request #1340 from sehraf/pr_remove-obsolete-version-scripts
remove obsolete version scripts
2018-09-15 17:59:09 +02:00
sehraf
0b6644cd55
get rid of unused variables 2018-09-15 14:38:57 +02:00
sehraf
1e85b05f09
get rid of cipher_version variable. use plain output from openssl 2018-09-15 14:37:40 +02:00
sehraf
1faaf91ebe
G10h4ck said that there are obsolete since #1336 and should not be used anymore. 2018-09-14 17:01:52 +02:00
sehraf
7ce2bef37b
add support for displaying TLSv1.3 2018-09-14 16:27:50 +02:00
Gioacchino Mazzurco
148e46346d
JSON API accessible via HTTP GET method
This is useful in cases where the client cannot use POST method.
/jsonApiServer/shutdown now reply before shutting down the core.
2018-09-12 23:40:34 +02:00
Gioacchino Mazzurco
1694e37c58
More fixes to JSON API
Remove unnecessary dangerous method from RsLoginHelper
Fix documentation for RsServiceControl::getServiceName that was breaking
  JSON API and causing compilation warning
2018-09-12 10:49:37 +02:00
Gioacchino Mazzurco
5245765964
JSON API expose retroshare version
Added a couple of macro to reduce boilerplate in manually written API
wrappers, use them in auto-generated wrappers too
2018-09-12 10:49:37 +02:00
Gioacchino Mazzurco
92f90178c4
RS version is now parametrizable at compile time
Avoid the need of dirty patching to set the version at build time
In case RS version is not passed as argument attempt to determine it
  using git describe, if unavailable use hardcoded default
2018-09-12 10:49:36 +02:00
Gioacchino Mazzurco
5495f43c51
Fix RsServiceControl::getServiceItemNames doc
Was breaking JSON API and causing some compilation warnings
2018-09-12 00:31:16 +02:00
csoler
b138263878
Merge pull request #1323 from csoler/v0.6-ForumAdmin
V0.6 forum admin
2018-09-11 15:17:33 +02:00
csoler
c17b821ea6
Merge pull request #1334 from csoler/v0.6-GxsFix
auto send of own signed GXS ids to friends in discovery
2018-09-10 20:39:29 +02:00
csoler
2b80c23f6a
fixed according to comments on PR 1334 2018-09-10 20:03:47 +02:00
G10h4ck
cb83abf932
Merge pull request #1335 from sehraf/pr_jsonfy
Make more APIs jsonapi compatible
2018-09-10 00:29:07 +02:00
sehraf
247c368279
incorporated requested changes 2018-09-09 22:22:55 +02:00
csoler
59a76a9418
fixed checking of signature for own ids when loading in cache 2018-09-09 21:22:08 +02:00
sehraf
ae6a5c74d2
add rsPeer groups to jsonapi 2018-09-08 17:04:29 +02:00
sehraf
5a961179f3
unify parameter names 2018-09-08 09:48:27 +02:00
sehraf
31b0f67e94
jsonfy RsServiceControl 2018-09-08 09:47:45 +02:00
sehraf
9306d8ccc8
drop deprecated function 2018-09-08 08:58:42 +02:00
sehraf
ae14a01d58
add json support to getWaitingDiscCount 2018-09-07 14:19:06 +02:00
sehraf
be50400114
jsonfy rsDisc 2018-09-07 14:17:44 +02:00
sehraf
fb8e49ee66
jsonjy rsConfig 2018-09-07 12:58:30 +02:00
csoler
3402f7d9b5
auto send of own signed GXS ids to friends in discovery 2018-09-06 21:15:25 +02:00
sehraf
39c07f4ef0
make p3GxsTrans a class 2018-09-06 13:17:33 +02:00
csoler
b17d2a3aca
Merge pull request #1331 from G10h4ck/jsonapi
JSON API improvements
2018-09-06 08:39:30 +02:00
Gioacchino Mazzurco
2c8aa5a1fe
RsAccounts::getCurrentAccountId is now static 2018-09-06 02:04:48 +02:00
csoler
4a309b827a
fixed compilation with libressl2.7 (patch from sss, modified) 2018-09-05 21:00:34 +02:00
Gioacchino Mazzurco
7787f9d62f
Merge branch 'master' into jsonapi 2018-09-05 00:17:21 +02:00
Gioacchino Mazzurco
a194e4cf56
Make JSON API server bind address configurable
Enforce it being 127.0.0.1 by default, I assumed 127.0.0.1 was restbed
default, but as reported by sehraf is not alwayd the case

JSON API bind address now is also configurable via commandline on
retroshare-android-service and retroshare-nogui, while it obey the
configuration of webui (execept for that port is incremented by 2)
in retroshare-gui
2018-09-05 00:08:56 +02:00
csoler
59535eac8a
added a flag for moderating messages to help removign them when the author is not a moderator anymore 2018-09-02 17:07:40 +02:00
Gioacchino Mazzurco
7f74313552
JSON API close restbed session before shutting down 2018-09-01 15:54:11 +02:00
Gioacchino Mazzurco
7a37c11e47
Prevent crash calling uninitialized service via JSON API 2018-09-01 15:29:09 +02:00
Gioacchino Mazzurco
cc6f0b1f05
Expose RsPeers JSON API
Added also new method for better usability via the API that allow to add
  friend directly for RetroShare invitation (supports also URL) without
  having to call to mulptiple metods to set IP etc.
  RsPeers::acceptInvite
  /rsPeers/acceptInvite
2018-08-30 21:45:51 +02:00
Gioacchino Mazzurco
a8ddec03fc
Expose more login related JSON API
/rsLoginHelper/isLoggedIn to check if already logged in
/rsAccounts/getCurrentAccountId to get the id of current selected
  account, beware that an account may be selected without actually logging in
2018-08-30 19:09:50 +02:00
csoler
5c2f714ada
merged with upstream/master 2018-08-30 14:50:16 +02:00
csoler
65304a301a
added last relay (a.k.a which direct friend) of search results in sources column 2018-08-28 23:57:16 +02:00
csoler
c9b30f5a72
fixed merged with upstream/master 2018-08-28 23:42:24 +02:00
csoler
c294971633
Merge pull request #1289 from G10h4ck/jsonapi
Implement automatic JSON API generation
2018-08-28 19:11:08 +02:00
Gioacchino Mazzurco
dd55ddea95
Add more consistency checks to serialization code
As suggested by Cyril
2018-08-28 15:20:41 +02:00
Gioacchino Mazzurco
3094146c13
RsLoginHelper::attemptLogin clear cached passphrase after usage
Thanks Cyril for suggestion
2018-08-28 14:35:29 +02:00
Gioacchino Mazzurco
75e882bb9f
Make NotifyClient class again 2018-08-28 14:12:09 +02:00
csoler
5f18d26738
removed unused member depth from search results to avoid confusion while ensureing backward compatibility is kept 2018-08-27 23:36:21 +02:00
csoler
fd25f8336e
Merge pull request #1329 from sehraf/pr_small-fixes
small fixes
2018-08-27 10:56:29 +02:00
Gioacchino Mazzurco
1dfe64443f
Improve documentation 2018-08-26 11:39:26 +02:00