Advanced Issues - RetroGuard Documentation
In this section we discuss some advanced topics on incremental obfuscation and patching, using RetroGuard and RGpatch. Patch SequencesOne method of providing patches is to include in each patch only those changes which have occurred since the last patch was issued. The sequence of major release and patch Jar names might be:
Using this method means that each patch is as small as possible. However,
the user's classpath can become polluted by a long series of patch files
which must be given in the correct order.
An alternative technique is to have each patch contain all changes since the last major release. The user has only the most recent patch file in their classpath, but each patch becomes larger than the last. A typical sequence of major release and patch Jar names might then be:
Whichever method suits your project, it is clear that a very careful accounting must be kept of code changes, obfuscation log-files and shipped versions of your software. A robust and flexible version control system such as CVS (available as free software from CVS Home) is recommended for this purpose. In addition, it is recommended that a comprehensive suite of automated tests are developed for your product. This is always desirable, but is particularly helpful in testing patches. The suite can be used to exercise the unobfuscated, the obfuscated, and the patched versions of the product prior to shipping. Clearly, results should be identical in each case. Addition Entry PointsA patch can be used to introduce one or more
new entry points into your product. This will, as usual, require the listing
of these entry points in the RGS file used during obfuscation. Since the
log-file from the prior version is used as the RGS script file during
incremental obfuscation, the additional The existing entries in the log-file should not, under any circumstances, be edited or removed: to do so would cause corruption of the generated patch file. In addition, any new entry points (methods which are to be left unobfuscated) must have been introduced to the code since the previous version. It is not possible to change an existing method from being obfuscated in one version to being unobfuscated in the next. Inner ClassesSince inner classes have privileged access to
their outer classes, a patch containing a class must also contain all of
its inner classes. The
|
|