summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2012-10-18Trying to quieten down PMD's complaining a little bitKevin Smith
Change-Id: Id2710c674abc19cdf2b37f97fe53288b86c7f367
2012-10-02Avoid NPEsKevin Smith
2012-10-02Protect against null manual hostnamesKevin Smith
2012-09-21Update some interfaces for consistency with Swiften.Kevin Smith
Makes ClientOptions do more.
2012-09-21Remove superfluous event loopKevin Smith
2012-03-29Make CoreClient.getSessionCertificate more robustNick Hudson
The javadoc for the method was not in line with its behaviour, so you could get a NullPointerException if you asked for a session certificate when the session wasn't TLS. This patch makes the code do what the javadoc says (and what clients most likely want) Test-information: Returns null rather than crashing when I ask for a certificate on a non-TLS stream.
2012-03-19Add "isTLSEncrypted" and "getPeerCertificate" to CoreClientNick Hudson
Corresponding with change in Swiften (assuming that is approved; it's not yet been integrated at the time of writing) Test-information: Works as expected in my test applications
2012-03-19Update CoreClient to be a bit more in line with SwiftenNick Hudson
This change - renames the "onError" signal to be "onDisconnected" (as per change 59be74ec6 in Swiften) - adds "setCertificateTrustChecker()" method and uses the supplied checker when configuring TLS Test-information: My applications still work. When I configure my server with a certificate that doesn't correspond to the requirements in RFC 6120, my CertificateTrustChecker gets called, and the session is either dropped or maintained depending on what my checker returns.
2012-03-08Implement "CertificateWithKey" and add support for setting client certificatesNick Hudson
This change provides the functionality to allow clients to specify a PKCS#12 file containing client certificate/key for use when starting TLS sessions. The PKCS12Certificate class now subclasses "CertificateWithKey" (matching the Swiften implementation). Swiften also has "CAPICertificate", which is another subclass of CertificateWithKey. This has not been provided in this patch. From a client's point of view, all that's necessary to specify a certificate to be used for TLS is to do something like CertificateWithKey myCert = new PKCS12Certificate( "/home/fred/myp12file.p12", "secret".toCharArray()); coreClient.setCertificate(myCert); before calling "CoreClient.connect". Matching the Swiften functionality, constructing a new PKCS12Certificate does not actually perform validation of the P12 file/passphrase; that takes place when the p12 file is used. There is limited scope for returning to the caller errors describing possible problems, but JSSEContext uses the "emitError" method which does maintain error information, which is available in a debugger, or from the JSSEContext.toString() method. Test-information: Set up an M-Link server with TLS verified that - when I specify a client certificate with suitable SAN, the client sends it and the server reports authentication using the certificate - when I specify a client certificate without a suitable SAN, the client sends it but the server rejects it
2012-02-23Allow non-standard ports on internal interface methodKevin Smith
2012-01-18Add toString to some more classesNick Hudson
Also made "Stanza" be an abstract class and had its ".toString()" include the name of the subclass which is involved, so that the subclasses don't have to do that themselves. Also added null check to existing HostAddress.toString() method Also fixed Remko copyright in Connector class Test-information: Stuff is displayed as expected in debugger.
2012-01-12Add Javadoc for CoreClient, EventLoop, JIDMili Verma
Test-information: Looks okay.
2011-10-31Fix utf-8 encoding on Remko's name throughout. Now compiles with Java 7Kevin Smith
2011-07-01Initial importKevin Smith