rvthtool (and other programs included with rvthtool) does not access the
network directly, but may access the network if you attempt to open files
located on network shares.
Install NETWORK.md in the documents directory.
[cmake] options.cmake: Add OPTION(INSTALL_DOC).
Ubuntu 16.04 has CMake 3.5, so we can target that as the minimum
version. Also, recent CMake versions (3.27+) have started printing
warnings if the minimum is less than 3.5.
CMake Deprecation Warning at CMakeLists.txt:2 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
Also, remove CMAKE_MINIMUM_REQUIRED() from all subdirectories.
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h(8816,5): warning C5105: macro expansion producing 'defined' has undefined behavior
C:\Program Files (x86)\Windows Kits\8.1\Include\um\oaidl.h(473,17): warning C5103: pasting '/' and '/' does not result in a valid preprocessing token
C:\Program Files (x86)\Windows Kits\8.1\Include\shared\wtypes.h(742,1): message : in expansion of macro '_VARIANT_BOOL'
C:\Program Files (x86)\Windows Kits\8.1\Include\um\oaidl.h(473,17): error C2059: syntax error: '/'
Force C99 when compiling with MSVC for now.
CMake 3.1 added CMAKE_<LANG>_STANDARD, which allows CMake to determine
what flags are needed to select a particular language version.
Set it to C17 and C++17. Previously, we were using C11 and C++11,
though gcc11 switched the default C++ version to C++17. The custom
macro handled this by not adding flags for C++, but it still added
the C11 flag, which prevented use of C17.
Ported over from rom-properties.
Added a bunch of other build options from rom-properties.
Fixed compilation with UDEV disabled. In particular, HAVE_QUERY is set
if querying is available at all, and if it isn't available, rvthtool's
help will show a note, and attempting to run the query command will show
an error message.
Added Google Test v1.8.0 from rom-properties.
Reworked cert_verify() to support both RSA-4096 and RSA-2048 signatures
and public keys. The function now requires all certificates to use
big-endian, so cert_store.c now uses BE32_CONST() to store the values
as big-endian.
BE32_CONST() is a macro that uses shifting for MSVC and intrinsics for
gcc. This is needed because MSVC 2010 doesn't realize that its byteswap
intrinsics result in constant values. (Later versions might...)
cert.c: New function cert_get_size() that returns the full size of a
built-in certificate.
CertVerifyTest currently tests the retail ticket and TMD certificates.
Both tests pass with all of these changes.
cert_verify() takes a ticket or TMD (or anything that starts with a
compatible RSA-2048 signature), decrypts the signature, then verifies
the SHA-1 hash. The SHA-1 hash is calculated based on the rest of the
specified data structure, including the signature issuer field.
Both the signature and SHA-1 hash are checked for validity. If the
calculated hash starts with 0x00 but the signature is invalid, this
usually means it's fakesigned.
On Linux, the certification verification code uses gmp to decrypt the
RSA signature and nettle to calculate the SHA-1 hash. This is currently
not implemented for Windows, so on Windows it will return -ENOSYS.
Note that the Linux build now requires gmp and nettle.
TODO: Verify that it works with nettle-2.x.
This program will allow for managing Nintendo RVT-H Reader devkits,
including dumping existing images and installing new images.
The current version doesn't actually do anything. It's mostly a copy
of the infrastructure from rom-properties, with some changes. In
particular, we're using CMake's TARGET_COMPILE_FEATURES() instead of
manually detecting C99 support.