summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNick Hudson <nick.hudson@isode.com>2012-02-13 12:24:53 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-02-14 10:06:42 (GMT)
commitf5e722a7f28f3407600e023700739ff3b9cc83c2 (patch)
tree7f0d9054c99f5ddc4dbbaa453a74e3cc09bfe736 /test
parentaeab1723a7efdd2eb989ff29afc7461ee4d27936 (diff)
downloadstroke-f5e722a7f28f3407600e023700739ff3b9cc83c2.zip
stroke-f5e722a7f28f3407600e023700739ff3b9cc83c2.tar.bz2
Add parsing of XMPP and SRV subjectAltNames to JavaCertificate
The JavaCertificate class functionality copies that found in Swiften's OpenSSLCertificate class. One of the things that the class needs to do is make available lists of SRV and XMPP names which are contained in the certificate's subjectAltName extensions. However, unlike OpenSSL, the standard Java classes don't provide support for parsing the different types of subjectAltNames that we want - what Java provides is a method to return the DER encoded values, and so this change adds functions to the JavaCertificate class to parse these values to extract Strings corresponding to either XMPP or SRV subjectAltNames. Also addressed a couple of comments from a previous patch. Test-information: Tested with certificate that has subjectAltNames for - Service Name _xmpp-client.funky.isode.net - Service Name _xmpp-server.funky.isode.net - XMPP address funky.isode.net - DNS Name funky.isode.net And verified that all of these are parsed and made available with the relevant methods. Verified that a certificate which does NOT contain any of these subjectAltNames is parsed with no errors (and the code reports no matching subjectAltNames) Signed-off-by: Nick Hudson <nick.hudson@isode.com>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions