This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jivesoftware.smack.ConnectionConfiguration.SecurityMode; | |
import org.jivesoftware.smack.*; | |
import org.jivesoftware.smack.SmackException.NotConnectedException; | |
import org.jivesoftware.smack.filter.StanzaFilter; | |
import org.jivesoftware.smack.packet.DefaultExtensionElement; | |
import org.jivesoftware.smack.packet.ExtensionElement; | |
import org.jivesoftware.smack.packet.Message; | |
import org.jivesoftware.smack.packet.Stanza; | |
import org.jivesoftware.smack.provider.ExtensionElementProvider; | |
import org.jivesoftware.smack.provider.ProviderManager; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Utility class to read encrypted PEM files and generate a | |
* SSL Socket Factory based on the provided certificates. | |
* The original code is by Sharon Asher (link below). I have modified | |
* it to use a newer version of the BouncyCastle Library (v1.52) | |
* | |
* Reference - https://gist.github.com/sharonbn/4104301" | |
*/ | |
import org.bouncycastle.cert.X509CertificateHolder; |