Commit Graph

133 Commits

Author SHA1 Message Date
Sylvain Pelissier
16af634aa6
Remove global usage in AES encryption ##crypto 2021-09-28 10:40:22 +02:00
Sylvain Pelissier
76807f588e
Add AES Key Wrap Algorithm ##crypto 2021-09-25 06:53:57 +02:00
Michal Ambroz
3b95a8f754
Avoid c99 feature (#18602)
Hello,
this patch avoids c99 feature of declaring variable withing the for stanza. 


Sample build log output
FAILED: libr/crypto/libr_crypto.so.5.2.0.p/p_crypto_cps2.c.o 
cc -Ilibr/crypto/libr_crypto.so.5.2.0.p -I. -I.. -I../libr/include -I../shlr/spp -I../shlr/sdb/src -pipe -D_FILE_OFFSET_BITS=64 -fvisibility=hidden -O2 -g -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -pthread -DR2_PLUGIN_INCORE=1 -MD -MQ libr/crypto/libr_crypto.so.5.2.0.p/p_crypto_cps2.c.o -MF libr/crypto/libr_crypto.so.5.2.0.p/p_crypto_cps2.c.o.d -o libr/crypto/libr_crypto.so.5.2.0.p/p_crypto_cps2.c.o -c ../libr/crypto/p/crypto_cps2.c
../libr/crypto/p/crypto_cps2.c: In function 'set_key':
../libr/crypto/p/crypto_cps2.c:729:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (int b = 0; b < 10 * 16; b++) {
   ^
../libr/crypto/p/crypto_cps2.c:729:3: note: use option -std=c99 or -std=gnu99 to compile your code
ninja: build stopped: subcommand failed.
2021-04-21 01:27:33 +02:00
pancake
da3db59a22
Remove some exit() calls in libr ##api (#18565)
Co-authored-by: Anton Kochkov <xvilka@gmail.com>
2021-04-11 02:34:23 +02:00
el-goe
6ac85fc278
Update to use keys that can be programmed onto a CPS2 ##crypto
Co-authored-by: Alex Urbano <alex.urbano.alvarez@gmail.com>
2021-04-02 17:22:52 +02:00
Liumeo
6119a784e8
Fix UB in serpent ##crypto (#17899) 2020-11-10 12:36:16 +08:00
pancake
aa7de006e6 Fix TinyCC build ##build 2020-09-27 13:33:26 +08:00
Khairul Azhar Kasmiran
d9057505dc
Set RPATH/RUNPATH on r2 libs too if local (#17639) 2020-09-15 09:16:14 +02:00
Riccardo Schirone
594b940b7c
Fixes some of the issues in Travis (#17267)
* Do not check with r_return_ if the convention is present

Let's just assume the NULL default in such a case, so that architectures
for which we don't have a defined calling convention can still be
processed somehow by the analysis code. It won't be precise, but it's
better than nothing.

Also add a warning message so users are aware when the calling
convention is not defined.

* Fix oob-read when # is at the end of the cmd string

* Do not set TMPDIR when the new value is the empty string

When TMPDIR is set to empty value, clang+ld behaves in weird ways and
you cannot compile files from within the r2 shell (e.g. when using #!c
or #!cpipe)

* Use meson and add -lasan to pkgconfig files when sanitizer are used
2020-07-16 20:47:30 +08:00
pancake
160fc95e66
Use (void) instead of () in function signatures (#17026) ##refactoring
* Use (void) instead of () in function signatures
* Add test to avoid further contributions to commit the same mistake
2020-06-14 16:08:32 +02:00
Anton Kochkov
ffe743ef39
Fix #4056 - rename DEPS to R2DEPS ##build (#17020)
* Rename DEPS to R2DEPS
* Cleanup of sys/build.sh
2020-06-12 10:49:28 +08:00
Sylvain Pelissier
941d03a6aa
Add one more word in AES key search and merge Sbox (#16811) 2020-05-12 11:58:26 +08:00
mdolmen
411ee616a1
Remove hardcoded supported encoders names (#16664) ##util 2020-04-24 11:49:22 +02:00
Rikard Falkeborn
2ae06923b4
Fix check for failed allocation (#16232) 2020-03-17 01:02:43 +01:00
radare
72093ac706
Fix #16138 - Do not preincrement when it's not necessary (#16151) 2020-03-05 19:06:59 +01:00
Anton Kochkov
20e19d6023 More spelling fixes in the code 2019-06-20 13:36:02 +08:00
radare
571a080ca7
s/CORELIB/R2_PLUGIN_INCORE/g (#14295) 2019-06-13 19:12:51 +02:00
lzutao
1365948cee Do not use reversed keyword of meson ##build
`files` is a reversed keyword in meson. Try to avoid using it.
2019-01-10 14:15:50 +01:00
pancake
b29f5bb54a Fix some issues reported by clang-analyzer 2018-12-31 05:36:14 +01:00
lzutao
9cc6d2d291 meson: Do not use glob with meson ##build
* meson: Explicit is better than implicit
* meson: Fix deprecated warnings in Meson 0.49.0
* meson: Do not need separate array for installed files

libr/socket/meson.build:30: DEPRECATION: Library r_socket was passed to
the "libraries" keyword argument of a previous call to generate() method
instead of first positional argument. Adding r_socket to "Requires" field,
but this is a deprecated behaviour that will change in a future version
of Meson. Please report the issue if this warning cannot be avoided in
your case.
2018-12-27 14:17:54 +01:00
radare
d05292e485
Fix 80 warnings coming from gcc8.2 (#12280) 2018-11-22 22:11:43 +01:00
radare
71053f17e9
Move trie, mixed, slist into Sdb's Attic, and DES from util to crypto ##refactor 2018-11-07 17:18:14 +01:00
Neven Sajko
9fadc2ab9f Put 'static' first in declarations (#11526) 2018-09-15 23:06:11 +02:00
Paul I
bf29250ddd Fix #11487 (#11534) 2018-09-15 22:52:12 +02:00
Neven Sajko
8ee4c902fb Fix #10408 Implement bitwise rotations correctly (#11508) 2018-09-13 11:00:02 +02:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
Riccardo Schirone
eee1385466
Meson private (#11331)
* meson: refactor library cflags
* meson: use visibility=hidden by default
* remove unused var
* magic/meson: replace tabs with spaces
2018-09-03 10:07:28 +02:00
radare
a8aad5305d
Fix buffer overflow in base64 decoder with 'UyoKCg==' (#11319) 2018-08-31 01:56:12 +02:00
Neven Sajko
d8784641ee Add parentheses in macros where needed for safety (#11290) 2018-08-30 13:16:50 +02:00
Paul I
620affc89e Fix some warnings (#11152) 2018-08-20 14:52:02 +08:00
Riccardo Schirone
7572f315ea
meson improvements (#10617)
* meson.build: fix meson build when not on git
* meson.build: make capstone a dependency
* meson.build: make r_magic library optional
* meson.build: capstone include is already in the dependency
* meson.build: use dependencies instead of manual linking + includes
* meson.build: add travis
* flag/meson.build: include sdb dependency
* travis-script: print messages based on install system
* io/meson.build: add sdb as dependency
* syscall/meson.build: missing sdb dependency
* {parse,config}/meson.build: add sdb dependency
* travis.yml: pass INSTALL_SYSTEM var to docker
* {bin/shlr}/meson.build: add sdb_dep to r2java and bin
* install meson and ninja-build in r2-travis docker
* travis.yml: allow meson build to fail for now
* anal/meson.build: add sdb and java dependencies
* egg/meson.build: add sdb dependency
* travis.yml: meson build env should be also in the includes list
* core/meson.build: add java dep
* meson.build: use dependencies also to create main r2 dependency
* rasm2/meson.build: replace link_with with dependencies
* rasm2/meson.build: add sdb as dependency
* meson.builds: convert link_with to dependencies and fix tabs
* travis-script: change meson install prefix and set PKG_CONFIG_PATH
* travis-script: add lib64 to LD_LIBRARY_PATH
2018-07-09 16:58:38 +02:00
pancake
65deb59f5f Restrict width boundaries in panels 2018-06-20 10:13:58 +02:00
Paul I
7e9f982849 Meson: some cleanup (#10076) 2018-05-16 10:24:35 +02:00
Paul I
cc90ec6be5 [WIP] Move hardcoded paths to r_userconf.h (#9959)
* Move hardcoded paths to r_userconf.h

* Add R2_HOME_* macros

* Some cleanup
2018-04-28 10:02:55 +02:00
Paul I
40b4a5b557 Meson: disable libversion info for Windows (#9858) 2018-04-10 22:44:54 +02:00
Paul I
ca3652da4b Meson: Add version info for shared libs (#9763) 2018-03-24 18:18:32 +01:00
Florian Märkl
5e1f811ec0 Fix meson indentation (#9567) 2018-03-03 22:08:37 +01:00
Florian Märkl
95a1b75784 Install Headers and .pc Files with Meson (#9548)
Use meson pkgconfig for .pc files

meson 0.44

Install same headers as acr
2018-03-03 20:00:18 +08:00
Paul I
bb4f61580e Cleanup meson files (#9424) 2018-02-20 09:33:19 +01:00
whitequark
c816dc7e66 Don't try to build shared libraries if configured as --without-pic.
Specifically, avoid building all plugins as non-static objects,
as well as some supplementary libraries. In fact, a large amount
of plugins was already gated to build as shared objects only with
WITHPIC=1, but this was not done consistently.
This gating has been moved to */p/Makefile.

Building these shared objects is a waste of time and breaks
the --without-pic build unless CFLAGS is forced in the make
invocation.
2018-01-11 23:09:22 +01:00
Nics
680d3e3329 Implem and integration of the Serpent cipher (ECB) (#8917)
* Implem and integration of the Serpent cipher (ECB)

* Fix for loop variables to be C90 compliant.

* Fix coding style

* Add meson config for Serpent
2017-11-30 22:47:29 +01:00
Maijin
4bb5c15faa r_lib_struct_t -> RLibStruct 2017-11-10 13:38:05 +01:00
SkUaTeR
c31d81da26 support for static build (#7822)
* support for static build
* improved sharard/static build
2017-06-28 22:54:40 +02:00
SkUaTeR
dc7914644e Meson improvements 2017-05-31 13:38:47 +02:00
pancake
6758e3753d Remove configure-plugins dependency for the make meson 2017-05-26 02:43:53 +02:00
SkUaTeR
9a1337512a meson.build fixes to build with MSVC 2017-05-14 23:06:00 +02:00
SkUaTeR
beb80cfc16 Fixes for MSVC 2017-05-09 23:53:20 +02:00
xarkes
926f024909 Improved MSVC support (WIP) 2017-05-09 14:25:57 +02:00
pancake
60f9667654 Remove support for bjam build system
- Delete all Jamroot files
2017-05-02 05:48:40 +02:00
pancake
fa671b9a16 Initial support for the Meson build system
- Integrated with current ACR
- Fix some stale fails got removed
2017-05-02 05:05:36 +02:00