Commit bddedae1 authored by Dele Olajide's avatar Dele Olajide Committed by dele

Fixed OF-715 - Update Openfire bouncycastle library from 1.46 to 1.49

Fixed OF-716 - Add Jitsi Videobridge plugin to Openfire plugins

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13819 b35dd754-fafc-0310-a699-88a17e54d16e
parent 74e18f53
......@@ -160,7 +160,7 @@
<fileset dir="${lib.build.dir}" includes="*.jar" excludes="junit.jar"/>
<fileset dir="${lib.merge.dir}" includes="*.jar"/>
<fileset dir="${lib.dist.dir}"
includes="servlet.jar, mail.jar, activation.jar, jdic.jar, bouncycastle.jar"/>
includes="servlet.jar, mail.jar, activation.jar, jdic.jar, bcpg-jdk15on.jar bcpkix-jdk15on.jar bcprov-jdk15on.jar"/>
</path>
<path id="compile.dependencies">
......
......@@ -58,10 +58,11 @@ import java.util.regex.Pattern;
import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.ASN1InputStream;
import org.bouncycastle.asn1.ASN1TaggedObject;
import org.bouncycastle.asn1.DEREncodable;
import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.DERSequence;
import org.bouncycastle.asn1.DERObjectIdentifier;
import org.bouncycastle.asn1.DEROutputStream;
import org.bouncycastle.asn1.DERSequence;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.DERTaggedObject;
import org.bouncycastle.asn1.DERUTF8String;
import org.bouncycastle.asn1.x509.GeneralName;
......@@ -99,7 +100,7 @@ public class CertificateManager {
private static final int CERT_REQ_LINE_LENGTH = 76;
private static List<CertificateEventListener> listeners = new CopyOnWriteArrayList<CertificateEventListener>();
static {
// Add the BC provider to the list of security providers
Security.addProvider(provider);
......@@ -251,12 +252,12 @@ public class CertificateManager {
try {
// Value is encoded using ASN.1 so decode it to get the server's identity
ASN1InputStream decoder = new ASN1InputStream((byte[]) item.get(1));
DERSequence otherNameSeq = (DERSequence) decoder.readObject();
ASN1Sequence otherNameSeq = (ASN1Sequence) decoder.readObject();
// Check the object identifier
DERObjectIdentifier objectId = (DERObjectIdentifier) otherNameSeq.getObjectAt(0);
Log.debug("Parsing otherName for subject alternative names: " + objectId.toString() );
if ( !OTHERNAME_XMPP_OID.equals(objectId.getId())) {
// Not a XMPP otherName
Log.debug("Ignoring non-XMPP otherName, " + objectId.getId());
......@@ -266,7 +267,7 @@ public class CertificateManager {
// Get identity string
try {
final String identity;
DEREncodable o = otherNameSeq.getObjectAt(1);
ASN1Encodable o = otherNameSeq.getObjectAt(1);
if (o instanceof DERTaggedObject) {
ASN1TaggedObject ato = DERTaggedObject.getInstance(o);
Log.debug("... processing DERTaggedObject: " + ato.toString());
......@@ -455,7 +456,7 @@ public class CertificateManager {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DEROutputStream deros = new DEROutputStream(baos);
deros.writeObject(csr.getDERObject());
deros.writeObject(csr.toASN1Primitive());
String sTmp = new String(org.bouncycastle.util.encoders.Base64.encode(baos.toByteArray()));
// Header
......@@ -900,10 +901,10 @@ public class CertificateManager {
// Generate the subject alternative name
boolean critical = subjectDN == null || "".equals(subjectDN.trim());
DERSequence othernameSequence = new DERSequence(new ASN1Encodable[]{
ASN1Sequence othernameSequence = new DERSequence(new ASN1Encodable[]{
new DERObjectIdentifier("1.3.6.1.5.5.7.8.5"), new DERTaggedObject(true, 0, new DERUTF8String(domain))});
GeneralName othernameGN = new GeneralName(GeneralName.otherName, othernameSequence);
GeneralNames subjectAltNames = new GeneralNames(new DERSequence(new ASN1Encodable[]{othernameGN}));
GeneralNames subjectAltNames = new GeneralNames(new GeneralName[]{othernameGN});
// Add subject alternative name extension
certGenerator.addExtension(X509Extensions.SubjectAlternativeName, critical, subjectAltNames);
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Jitsi Video Bridge Plugin Changelog</title>
<style type="text/css">
BODY {
font-size : 100%;
}
BODY, TD, TH {
font-family : tahoma, verdana, arial, helvetica, sans-serif;
font-size : 0.8em;
}
H2 {
font-size : 10pt;
font-weight : bold;
padding-left : 1em;
}
A:hover {
text-decoration : none;
}
H1 {
font-family : tahoma, arial, helvetica, sans-serif;
font-size : 1.4em;
font-weight: bold;
border-bottom : 1px #ccc solid;
padding-bottom : 2px;
}
TT {
font-family : courier new;
font-weight : bold;
color : #060;
}
PRE {
font-family : courier new;
font-size : 100%;
}
</style>
</head>
<body>
<h1>
Jitsi Video Bridge Plugin Changelog
</h1>
<p><b>1.0</b> -- Nov 30th, 2013</p>
<ul>
<li>OF-716 Added to Openfire plugins </li>
</ul>
<p><b>1.0</b> -- Apr 12, 2013</p>
<ul>
<li>Initial release. </li>
</ul>
</body>
</html>
Some of the files here, notably libjitsi.jar, are OSGi bundles from the Jitsi
project. In Jitsi they are generated in the 'sc-bundles' directory by the
'bundles' ant target. To update the files here, run 'ant rebuild' in Jitsi and
then copy the files, e.g.:
for i in *; do
if [ -e ../../jitsi/sc-bundles/$i ]; then
cp ../../jitsi/sc-bundles/$i .;
fi;
done
<?xml version="1.0" encoding="UTF-8" ?>
<plugin>
<author>jitsi.org and igniterealtime.org</author>
<class>org.jitsi.videobridge.openfire.PluginImpl</class>
<description>Integrates Jitsi Video Bridge into Openfire.</description>
<licenseType>other</licenseType>
<minServerVersion>3.0.0</minServerVersion>
<name>Jitsi Video Bridge</name>
<version>1.0</version>
<adminconsole>
<tab id="tab-server">
<sidebar id="siderbar-jvb"
name="${plugin.title}">
<item id="jitsi-videobridge-settings"
name="${plugin.title}"
description="${plugin.title.description}"
url="jitsi-videobridge.jsp"/>
</sidebar>
</tab>
</adminconsole>
</plugin>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Jitsi Video Bridge Plugin Readme</title>
<style type="text/css">
BODY {
font-size : 100%;
}
BODY, TD, TH {
font-family : tahoma, verdana, arial, helvetica, sans-serif;
font-size : 0.8em;
}
H2 {
font-size : 10pt;
font-weight : bold;
}
A:hover {
text-decoration : none;
}
H1 {
font-family : tahoma, arial, helvetica, sans-serif;
font-size : 1.4em;
font-weight: bold;
border-bottom : 1px #ccc solid;
padding-bottom : 2px;
}
TT {
font-family : courier new;
font-weight : bold;
color : #060;
}
PRE {
font-family : courier new;
font-size : 100%;
}
#datatable TH {
color : #fff;
background-color : #2A448C;
text-align : left;
}
#datatable TD {
background-color : #FAF6EF;
}
#datatable .name {
background-color : #DCE2F5;
}
</style>
</head>
<body>
<h1>
Jitsi Video Bridge Plugin Readme
</h1>
<h2>Overview</h2>
<p>
The Jitsi Video Bridge Plugin is an XMPP server component that allows for
multiuser video communication. Unlike the expensive dedicated hardware videobridges,
Jitsi Videobridge does not mix the video channels into a composite video stream,
but only relays the received video channels to all call participants.
Therefore, while it does need to run on a server with good network bandwidth,
CPU horsepower is not that critical for performance.
</p>
<h2>Installation</h2>
<p>Copy jitsivideobridge.jar into the plugins directory of your Openfire server. The
plugin will then be automatically deployed. To upgrade to a new version, copy the new
jitsiVideobridge.jar file over the existing file.</p>
<h2>Configuration</h2>
Under Server settings -> Jitsi Videobridge tab you can configure it.
</body>
</html>
plugin.title=Jitsi Videobridge
plugin.title.description=Jitsi Videobridge Settings
config.page.title=Jitsi Videobridge Settings Page
config.page.configuration.title=Configuration
config.page.configuration.min.port=Min port used for media
config.page.configuration.max.port=Max port used for media
config.page.configuration.submit=Save
config.page.configuration.error.minport=Invalid min port value
config.page.configuration.error.maxport=Invalid max port value
<%--
- Jitsi VideoBridge, OpenSource video conferencing.
-
- Distributable under LGPL license.
- See terms of license at gnu.org.
--%>
<%@ page import="org.jitsi.videobridge.openfire.*" %>
<%@ page import="org.jivesoftware.openfire.*" %>
<%@ page import="org.jivesoftware.util.*" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<%
boolean update = request.getParameter("update") != null;
String errorMessage = null;
// Get handle on the plugin
PluginImpl plugin = (PluginImpl) XMPPServer.getInstance()
.getPluginManager().getPlugin("jitsivideobridge");
if (update)
{
String minPort = request.getParameter("minport");
if (minPort != null) {
minPort = minPort.trim();
try
{
int port = Integer.valueOf(minPort);
if(port >= 1 && port <= 65535)
JiveGlobals.setProperty(
PluginImpl.MIN_PORT_NUMBER_PROPERTY_NAME, minPort);
else
throw new NumberFormatException("out of range port");
}
catch (Exception e)
{
errorMessage = LocaleUtils.getLocalizedString(
"config.page.configuration.error.minport",
"jitsivideobridge");
}
}
String maxPort = request.getParameter("maxport");
if (maxPort != null) {
maxPort = maxPort.trim();
try
{
int port = Integer.valueOf(maxPort);
if(port >= 1 && port <= 65535)
JiveGlobals.setProperty(
PluginImpl.MAX_PORT_NUMBER_PROPERTY_NAME, maxPort);
else
throw new NumberFormatException("out of range port");
}
catch (Exception e)
{
errorMessage = LocaleUtils.getLocalizedString(
"config.page.configuration.error.maxport",
"jitsivideobridge");
}
}
}
%>
<html>
<head>
<title><fmt:message key="config.page.title" /></title>
<meta name="pageID" content="jitsi-videobridge-settings"/>
</head>
<body>
<% if (errorMessage != null) { %>
<div class="error">
<%= errorMessage%>
</div>
<br/>
<% } %>
<div class="jive-table">
<form action="jitsi-videobridge.jsp" method="post">
<table class="jive-table" cellpadding="0" cellspacing="0" border="0" width="50%">
<thead>
<tr>
<th colspan="2"><fmt:message key="config.page.configuration.title"/></th>
</tr>
</thead>
<tbody>
<tr>
<td><label class="jive-label"><fmt:message key="config.page.configuration.min.port"/>:</label><br>
</td>
<td align="left">
<input name="minport" type="text" maxlength="5" size="5"
value="<%=plugin.getMinPort()%>"/>
</td>
</tr>
<tr>
<td><label class="jive-label"><fmt:message key="config.page.configuration.max.port"/>:</label><br>
</td>
<td align="left">
<input name="maxport" type="text" maxlength="5" size="5"
value="<%=plugin.getMaxPort()%>"/>
</td>
</tr>
<tr>
<th colspan="2"><input type="submit" name="update"
value="<fmt:message key="config.page.configuration.submit" />"></th>
</tr>
</tbody>
</table>
</form>
</div>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment