Eliminate internal Sun api for CRLs and include X509 tests in suite
1 files renamed
2 files modified
File was renamed from Gitblit.iml |
| | |
| | | </library> |
| | | </orderEntry> |
| | | <orderEntry type="module-library"> |
| | | <library name="bcprov-jdk16-1.46.jar"> |
| | | <library name="bcprov-jdk15on-1.47.jar"> |
| | | <CLASSES> |
| | | <root url="jar://$MODULE_DIR$/ext/bcprov-jdk16-1.46.jar!/" /> |
| | | <root url="jar://$MODULE_DIR$/ext/bcprov-jdk15on-1.47.jar!/" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES> |
| | | <root url="jar://$MODULE_DIR$/ext/src/bcprov-jdk16-1.46-sources.jar!/" /> |
| | | <root url="jar://$MODULE_DIR$/ext/src/bcprov-jdk15on-1.47-sources.jar!/" /> |
| | | </SOURCES> |
| | | </library> |
| | | </orderEntry> |
| | | <orderEntry type="module-library"> |
| | | <library name="bcmail-jdk16-1.46.jar"> |
| | | <library name="bcmail-jdk15on-1.47.jar"> |
| | | <CLASSES> |
| | | <root url="jar://$MODULE_DIR$/ext/bcmail-jdk16-1.46.jar!/" /> |
| | | <root url="jar://$MODULE_DIR$/ext/bcmail-jdk15on-1.47.jar!/" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES> |
| | | <root url="jar://$MODULE_DIR$/ext/src/bcmail-jdk16-1.46-sources.jar!/" /> |
| | | <root url="jar://$MODULE_DIR$/ext/src/bcmail-jdk15on-1.47-sources.jar!/" /> |
| | | </SOURCES> |
| | | </library> |
| | | </orderEntry> |
| | | <orderEntry type="module-library"> |
| | | <library name="bcpkix-jdk15on-1.47.jar"> |
| | | <CLASSES> |
| | | <root url="jar://$MODULE_DIR$/ext/bcpkix-jdk15on-1.47.jar!/" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES> |
| | | <root url="jar://$MODULE_DIR$/ext/src/bcpkix-jdk15on-1.47-sources.jar!/" /> |
| | | </SOURCES> |
| | | </library> |
| | | </orderEntry> |
| | |
| | | </SOURCES> |
| | | </library> |
| | | </orderEntry> |
| | | <orderEntry type="module-library"> |
| | | <library name="jcalendar-1.3.2.jar"> |
| | | <CLASSES> |
| | | <root url="jar://$MODULE_DIR$/ext/jcalendar-1.3.2.jar!/" /> |
| | | </CLASSES> |
| | | <JAVADOC /> |
| | | <SOURCES /> |
| | | </library> |
| | | </orderEntry> |
| | | <orderEntry type="module-library" scope="TEST"> |
| | | <library name="junit-4.10.jar"> |
| | | <CLASSES> |
| | |
| | | import java.io.FileOutputStream;
|
| | | import java.io.FileWriter;
|
| | | import java.io.IOException;
|
| | | import java.io.InputStream;
|
| | | import java.lang.reflect.Field;
|
| | | import java.math.BigInteger;
|
| | | import java.security.InvalidKeyException;
|
| | |
| | | import java.security.cert.CertPathBuilderException;
|
| | | import java.security.cert.CertStore;
|
| | | import java.security.cert.Certificate;
|
| | | import java.security.cert.CertificateFactory;
|
| | | import java.security.cert.CollectionCertStoreParameters;
|
| | | import java.security.cert.PKIXBuilderParameters;
|
| | | import java.security.cert.PKIXCertPathBuilderResult;
|
| | |
| | | import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
|
| | | import org.slf4j.Logger;
|
| | | import org.slf4j.LoggerFactory;
|
| | |
|
| | | import sun.security.x509.X509CRLImpl;
|
| | |
|
| | | import com.gitblit.Constants;
|
| | |
|
| | |
| | | if (!caRevocationList.exists()) {
|
| | | return false;
|
| | | }
|
| | | InputStream inStream = null;
|
| | | try {
|
| | | byte [] data = FileUtils.readContent(caRevocationList);
|
| | | X509CRL crl = new X509CRLImpl(data);
|
| | | inStream = new FileInputStream(caRevocationList);
|
| | | CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
| | | X509CRL crl = (X509CRL)cf.generateCRL(inStream);
|
| | | return crl.isRevoked(cert);
|
| | | } catch (Exception e) {
|
| | | logger.error(MessageFormat.format("Failed to check revocation status for certificate {0,number,0} [{1}] in {2}",
|
| | | cert.getSerialNumber(), cert.getSubjectDN().getName(), caRevocationList));
|
| | | } finally {
|
| | | if (inStream != null) {
|
| | | try {
|
| | | inStream.close();
|
| | | } catch (Exception e) {
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
| | | StringUtilsTest.class, Base64Test.class, JsonUtilsTest.class, ByteFormatTest.class,
|
| | | ObjectCacheTest.class, PermissionsTest.class, UserServiceTest.class, LdapUserServiceTest.class,
|
| | | MarkdownUtilsTest.class, JGitUtilsTest.class, SyndicationUtilsTest.class,
|
| | | DiffUtilsTest.class, MetricUtilsTest.class, TicgitUtilsTest.class,
|
| | | DiffUtilsTest.class, MetricUtilsTest.class, TicgitUtilsTest.class, X509UtilsTest.class,
|
| | | GitBlitTest.class, FederationTests.class, RpcTests.class, GitServletTest.class,
|
| | | GroovyScriptTest.class, LuceneExecutorTest.class, IssuesTest.class, RepositoryModelTest.class })
|
| | | public class GitBlitSuite {
|