jsch-documentation
jsch-documentation copied to clipboard
Please update documentation with a more recent version
The current documentation is for an outdated version of JSch. For instance, the current version contains interface IdentityRepository which is not present in your documentation.
You are right here.
The reason for that is that I didn't use JSch for several years, and thus had no need for myself. (Actually I used it just for a single project involving remote controlling a bunch of small Linux boxes (earth quake sensors) from an Eclipse-based Frontend, back in summer 2011.) (And I also got no feedback at all that this was used by anyone – thanks for that now).
I might have a look on what I can do here, but I can't promise I find time for this in the near future.
If you want to contribute here, feel free. I can tell you what I did 5 years ago with the version bump to 0.1.45 (and before for the release candidates after 0.1.44).
As the upstream sources were not available in any repository form, but just as a download from Sourceforge (IIRC), I first imported the new version in the tarballs branch as a new commit based on the previous tarball. (I think this should be done with all the versions inbetween, too.)
This branch then was merged into master (the branch with the documentation), resolving any conflicts that arose. Then regenerate the documentation (using the ant build), and commit the result in the gh-pages branch.
That would at least have all new methods/classes/interfaces available in the documentation, though possibly not documented. Adding Javadocs for those then requires reading the source code (and potentially the RFCs).
I've already committed the tarbal contents for 0.1.46 to 0.1.54, and created a pull request for that.
Thanks for the pull request (#8, for the record). I've merged that (via fast-forward) into the tarballs branch, and also merged those commits into master (resolving lots of conflicts).
I didn't yet update the gh-pages branch. I'll be on vacations the next week, will hopefully have some time to look into that afterwards.
Feel free to look into missing documentation for the new classes meanwhile.
I have tried to add documentation for IdentityRepository, but it's not clear enough what it's actually for. I've only seen it in action once, with Pageant, but that was mostly copy-pasting.
Here's an overview of new public classes/interfaces in the main package:
- IdentityRepository (since 0.1.46)
- Signature (since 0.1.49)
- ConfigRepository (since 0.1.50)
- DHGEX256 (since 0.1.50)
- OpenSSHConfig (since 0.1.50)
- SftpStatVFS (since 0.1.50). This is used in new method ChannelSftp.statVFS.
- KeyPairPKCS8 (since 0.1.51)
- PBKDF (since 0.1.51)
- DHEC256, DHEC384, DHEC521 and DHECN (since 0.1.52)
- ECDH (since 0.1.52)
- KeyPairECDSA (since 0.1.52)
- KeyPairGenECDSA (since 0.1.52)
- SignatureECDSA (since 0.1.52)
I think the idea for the IdentityRepository is to be a storage of Identity instances (i.e. private keys) – either an internal storage of in-memory keys, or something like an SSH-agent. I don't have the source here to check, but will do so later.
Signature seems to be a new interface collecting the common methods of SignatureRSA and SignatureDSA (and later SignatureECDSA), allowing some code reuse. (While merging, I copied the some of the javadocs from Signature*'s to Signature's methods).
ConfigRepository (and its implementation OpenSSHConfig) seems to represent something like OpenSSH's config file, where you can have settings for each host name or host alias (like username, actual host name, port, which algorithms to use, ...) which will be used while connecting.
SftpStatVFS seems to represent the responses to the OpenSSH SFTP extension requests "[email protected]" and "[email protected]" (search for those names in OpenSSH's PROTOCOL file), which return the results of some POSIX system calls for some path or open file handle, giving some file system meta information like free space, block size, ...
The other files seem to be implementations (or wrappers of such) for new algorithms.
I've updated the online version (i.e. the gh-pages branch), after fighting a bit with the fact that javadoc 1.8 seems to avoid overwriting an existing stylesheet.css, and I locally still had the old one from some years ago lying around, which wouldn't work with the new HTML files. Adding this directory to the clean task finally helped.
I'll look into adding some documentation to the classes mentioned by you.
Current documentation state of the new classes:
- [x] IdentityRepository (since 0.1.46)
- [x] Signature (since 0.1.49)
- [x] ConfigRepository (since 0.1.50)
- [ ] DHGEX256 (since 0.1.50)
- [x] OpenSSHConfig (since 0.1.50)
- [ ] SftpStatVFS (since 0.1.50). This is used in new method ChannelSftp.statVFS.
- [x] KeyPairPKCS8 (since 0.1.51)
- [x] PBKDF (since 0.1.51)
- [ ] DHEC256, DHEC384, DHEC521 and DHECN (since 0.1.52)
- [x] ECDH (since 0.1.52)
- [x] KeyPairECDSA (since 0.1.52)
- [x] KeyPairGenECDSA (since 0.1.52)
- [x] SignatureECDSA (since 0.1.52)