diff --git a/sources b/sources index a337770..e7eccf8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3753669f345146bfc7060612fa4d5a3d v3.0.5.tar.gz +e45f034c5477b9310043b31d1a310b98 v3.2.0.tar.gz diff --git a/voms-api-java-bc147.patch b/voms-api-java-bc147.patch deleted file mode 100644 index 22a4e22..0000000 --- a/voms-api-java-bc147.patch +++ /dev/null @@ -1,336 +0,0 @@ -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/ac/impl/DefaultVOMSValidationStrategy.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/ac/impl/DefaultVOMSValidationStrategy.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/ac/impl/DefaultVOMSValidationStrategy.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/ac/impl/DefaultVOMSValidationStrategy.java 2014-12-17 09:19:10.674934059 +0100 -@@ -39,7 +39,7 @@ - import javax.security.auth.x500.X500Principal; - - import org.bouncycastle.asn1.ASN1ObjectIdentifier; --import org.bouncycastle.asn1.x509.X509Extension; -+import org.bouncycastle.asn1.x509.Extension; - import org.bouncycastle.cert.X509CertificateHolder; - import org.bouncycastle.cert.jcajce.JcaX509CertificateHolder; - import org.bouncycastle.operator.ContentVerifierProvider; -@@ -239,8 +239,8 @@ - private boolean checkNoRevAvailExtension(VOMSAttribute attributes, - List validationErrors) { - -- X509Extension noRevAvail = attributes.getVOMSAC().getExtension( -- X509Extension.noRevAvail); -+ Extension noRevAvail = attributes.getVOMSAC().getExtension( -+ Extension.noRevAvail); - if (noRevAvail != null && noRevAvail.isCritical()) { - validationErrors.add(newErrorMessage(other, - "NoRevAvail AC extension cannot be critical!")); -@@ -252,8 +252,8 @@ - private boolean checkAuthorityKeyIdentifierExtension( - VOMSAttribute attributes, List validationErrors) { - -- X509Extension authKeyId = attributes.getVOMSAC().getExtension( -- X509Extension.authorityKeyIdentifier); -+ Extension authKeyId = attributes.getVOMSAC().getExtension( -+ Extension.authorityKeyIdentifier); - if (authKeyId != null && authKeyId.isCritical()) { - validationErrors.add(newErrorMessage(other, - "AuthorityKeyIdentifier AC extension cannot be critical!")); -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/asn1/VOMSACGenerator.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/asn1/VOMSACGenerator.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/asn1/VOMSACGenerator.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/asn1/VOMSACGenerator.java 2014-12-17 09:45:43.404176616 +0100 -@@ -30,20 +30,21 @@ - import org.bouncycastle.asn1.ASN1Encodable; - import org.bouncycastle.asn1.ASN1EncodableVector; - import org.bouncycastle.asn1.ASN1InputStream; -+import org.bouncycastle.asn1.ASN1Object; - import org.bouncycastle.asn1.ASN1ObjectIdentifier; --import org.bouncycastle.asn1.DEREncodable; -+import org.bouncycastle.asn1.ASN1Primitive; - import org.bouncycastle.asn1.DERNull; --import org.bouncycastle.asn1.DERObject; - import org.bouncycastle.asn1.DEROctetString; - import org.bouncycastle.asn1.DERSequence; - import org.bouncycastle.asn1.DERTaggedObject; - import org.bouncycastle.asn1.x509.AlgorithmIdentifier; - import org.bouncycastle.asn1.x509.AuthorityKeyIdentifier; -+import org.bouncycastle.asn1.x509.Extension; - import org.bouncycastle.asn1.x509.GeneralName; - import org.bouncycastle.asn1.x509.GeneralNames; --import org.bouncycastle.asn1.x509.X509Extension; - import org.bouncycastle.cert.AttributeCertificateHolder; - import org.bouncycastle.cert.AttributeCertificateIssuer; -+import org.bouncycastle.cert.CertIOException; - import org.bouncycastle.cert.X509AttributeCertificateHolder; - import org.bouncycastle.cert.X509v2AttributeCertificateBuilder; - import org.bouncycastle.cert.jcajce.JcaX509CertificateHolder; -@@ -156,7 +157,7 @@ - return String.format("%s://%s:%d", voName, host, port); - } - -- private ASN1Encodable buildACCertsExtensionContent( -+ private ASN1Object buildACCertsExtensionContent( - EnumSet properties) { - - ASN1EncodableVector issuerCertsContainer = new ASN1EncodableVector(); -@@ -166,7 +167,7 @@ - issuerCertsContainer.add(new DERSequence()); - else - issuerCertsContainer.add(new DERSequence( -- getCertAsDEREncodable(aaCredential.getCertificate()))); -+ getCertAsASN1Encodable(aaCredential.getCertificate()))); - - return new DERSequence(issuerCertsContainer); - } -@@ -174,7 +175,7 @@ - private AuthorityKeyIdentifier buildAuthorityKeyIdentifier() { - - byte[] authKeyId = aaCredential.getCertificate().getExtensionValue( -- X509Extension.authorityKeyIdentifier.toString()); -+ Extension.authorityKeyIdentifier.toString()); - - if (authKeyId != null) { - return new AuthorityKeyIdentifier(authKeyId); -@@ -183,7 +184,7 @@ - return null; - } - -- private ASN1Encodable buildFQANsAttributeContent(List fqans, -+ private ASN1Object buildFQANsAttributeContent(List fqans, - GeneralName policyAuthorityInfo) { - - ASN1EncodableVector container = new ASN1EncodableVector(); -@@ -201,7 +202,7 @@ - return new DERSequence(container); - } - -- private ASN1Encodable buildGAExtensionContent( -+ private ASN1Object buildGAExtensionContent( - EnumSet properties, List gas, - GeneralName policyAuthorityInfo) { - -@@ -262,7 +263,7 @@ - - } - -- private ASN1Encodable buildTargetsExtensionContent( -+ private ASN1Object buildTargetsExtensionContent( - EnumSet properties, List targets) { - - ASN1EncodableVector targetSeq = new ASN1EncodableVector(); -@@ -315,6 +316,8 @@ - GeneralName policyAuthorityInfo = buildPolicyAuthorityInfo(voName, host, - port); - -+ try { -+ - builder.addAttribute(VOMS_FQANS_OID, - buildFQANsAttributeContent(fqans, policyAuthorityInfo)); - -@@ -327,7 +330,7 @@ - policyAuthorityInfo)); - - if (targets != null && !targets.isEmpty()) -- builder.addExtension(X509Extension.targetInformation, true, -+ builder.addExtension(Extension.targetInformation, true, - buildTargetsExtensionContent(generationProperties, targets)); - - if (!generationProperties -@@ -350,13 +353,17 @@ - .contains(ACGenerationProperties.INCLUDE_CRITICAL_AKID_EXTENSION)) - akidIsCritical = true; - -- builder.addExtension(X509Extension.noRevAvail, noRevAvailIsCritical, -- new DERNull()); -+ builder.addExtension(Extension.noRevAvail, noRevAvailIsCritical, -+ DERNull.INSTANCE); - - AuthorityKeyIdentifier akid = buildAuthorityKeyIdentifier(); - -- builder.addExtension(X509Extension.authorityKeyIdentifier, akidIsCritical, -- akid != null ? akid : new DERNull()); -+ builder.addExtension(Extension.authorityKeyIdentifier, akidIsCritical, -+ akid != null ? akid : DERNull.INSTANCE); -+ -+ } catch (CertIOException e) { -+ throw new VOMSError(e.getMessage(), e); -+ } - - return builder.build(getSigner(generationProperties)); - -@@ -373,19 +380,19 @@ - DERSequence acSeq = new DERSequence(vomsACs); - - CertificateExtension ext = new CertificateExtension( -- VOMS_EXTENSION_OID.getId(), acSeq.toASN1Object(), false); -+ VOMS_EXTENSION_OID.getId(), acSeq.toASN1Primitive(), false); - - return ext; - } - -- private DEREncodable getCertAsDEREncodable(X509Certificate cert) { -+ private ASN1Encodable getCertAsASN1Encodable(X509Certificate cert) { - - try { - byte[] certBytes = cert.getEncoded(); - - ByteArrayInputStream bais = new ByteArrayInputStream(certBytes); - ASN1InputStream is = new ASN1InputStream(bais); -- DERObject derCert = is.readObject(); -+ ASN1Primitive derCert = is.readObject(); - is.close(); - return derCert; - -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/asn1/VOMSACUtils.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/asn1/VOMSACUtils.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/asn1/VOMSACUtils.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/asn1/VOMSACUtils.java 2014-12-17 09:51:02.983413156 +0100 -@@ -31,21 +31,21 @@ - - import org.bouncycastle.asn1.ASN1InputStream; - import org.bouncycastle.asn1.ASN1OctetString; -+import org.bouncycastle.asn1.ASN1Primitive; - import org.bouncycastle.asn1.ASN1Sequence; - import org.bouncycastle.asn1.ASN1TaggedObject; - import org.bouncycastle.asn1.DERIA5String; --import org.bouncycastle.asn1.DERObject; - import org.bouncycastle.asn1.DEROctetString; --import org.bouncycastle.asn1.DERSequence; -+import org.bouncycastle.asn1.DLSequence; - import org.bouncycastle.asn1.x509.Attribute; - import org.bouncycastle.asn1.x509.AttributeCertificate; -+import org.bouncycastle.asn1.x509.Certificate; -+import org.bouncycastle.asn1.x509.Extension; - import org.bouncycastle.asn1.x509.GeneralName; - import org.bouncycastle.asn1.x509.IetfAttrSyntax; - import org.bouncycastle.asn1.x509.Target; - import org.bouncycastle.asn1.x509.TargetInformation; - import org.bouncycastle.asn1.x509.Targets; --import org.bouncycastle.asn1.x509.X509CertificateStructure; --import org.bouncycastle.asn1.x509.X509Extension; - import org.bouncycastle.cert.X509AttributeCertificateHolder; - import org.bouncycastle.jce.provider.BouncyCastleProvider; - import org.bouncycastle.jce.provider.X509CertificateObject; -@@ -124,7 +124,7 @@ - - while (theACs.hasMoreElements()) { - -- AttributeCertificate parsedAC = new AttributeCertificate( -+ AttributeCertificate parsedAC = AttributeCertificate.getInstance( - theACs.nextElement()); - acs.add(parsedAC); - } -@@ -178,8 +178,8 @@ - - List targets = new ArrayList(); - -- X509Extension targetExtension = ac -- .getExtension(X509Extension.targetInformation); -+ Extension targetExtension = ac -+ .getExtension(Extension.targetInformation); - - if (targetExtension == null) - return targets; -@@ -193,7 +193,7 @@ - // The deserialization has to be done by hand since it seems VOMS - // does not correctly encode the ACTargets extension... - ASN1Sequence targetSequence = (ASN1Sequence) asn1TargetContainer -- .getDERObject(); -+ .toASN1Primitive(); - Target[] asn1Targets = new Target[targetSequence.size()]; - - int count = 0; -@@ -291,8 +291,8 @@ - Attribute[] asn1Attrs = acHolder.getAttributes(VOMS_FQANS_OID); - - for (Attribute a : asn1Attrs) { -- DERObject theVOMSDerObject = a.getAttributeValues()[0].getDERObject(); -- IetfAttrSyntax attrSyntax = new IetfAttrSyntax( -+ ASN1Primitive theVOMSDerObject = a.getAttributeValues()[0].toASN1Primitive(); -+ IetfAttrSyntax attrSyntax = IetfAttrSyntax.getInstance( - ASN1Sequence.getInstance(theVOMSDerObject)); - - String policyAuthority = policyAuthoritySanityChecks(attrSyntax); -@@ -350,7 +350,7 @@ - - List gas = new ArrayList(); - -- X509Extension gasExtension = ac.getExtension(VOMS_GENERIC_ATTRS_OID); -+ Extension gasExtension = ac.getExtension(VOMS_GENERIC_ATTRS_OID); - - if (gasExtension == null) - return gas; -@@ -416,7 +416,7 @@ - - List certs = new ArrayList(); - -- X509Extension e = ac.getExtension(VOMS_CERTS_OID); -+ Extension e = ac.getExtension(VOMS_CERTS_OID); - - if (e == null) - return null; -@@ -429,7 +429,7 @@ - certSeq = (ASN1Sequence) certSeq.getObjectAt(0); - - @SuppressWarnings("unchecked") -- Enumeration encodedCerts = certSeq.getObjects(); -+ Enumeration encodedCerts = certSeq.getObjects(); - - CertificateFactory cf = null; - -@@ -443,7 +443,7 @@ - - while (encodedCerts.hasMoreElements()) { - -- DERSequence s = encodedCerts.nextElement(); -+ DLSequence s = encodedCerts.nextElement(); - X509CertificateObject certObj = null; - byte[] certData = null; - X509Certificate theCert = null; -@@ -451,7 +451,7 @@ - try { - - certObj = new X509CertificateObject( -- X509CertificateStructure.getInstance(ASN1Sequence.getInstance(s))); -+ Certificate.getInstance(ASN1Sequence.getInstance(s))); - certData = certObj.getEncoded(); - theCert = (X509Certificate) cf - .generateCertificate(new ByteArrayInputStream(certData)); -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/asn1/VOMSConstants.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/asn1/VOMSConstants.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/asn1/VOMSConstants.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/asn1/VOMSConstants.java 2014-12-17 09:19:10.761933034 +0100 -@@ -20,7 +20,7 @@ - import java.util.Set; - - import org.bouncycastle.asn1.ASN1ObjectIdentifier; --import org.bouncycastle.asn1.x509.X509Extension; -+import org.bouncycastle.asn1.x509.Extension; - - /** - * A set of useful constants for ASN.1 parsing of VOMS attributes. -@@ -56,7 +56,7 @@ - - public final Set VOMS_HANDLED_EXTENSIONS = new HashSet( - Arrays.asList(VOMS_FQANS_OID, VOMS_CERTS_OID, VOMS_GENERIC_ATTRS_OID, -- X509Extension.targetInformation, X509Extension.noRevAvail, -- X509Extension.authorityKeyIdentifier)); -+ Extension.targetInformation, Extension.noRevAvail, -+ Extension.authorityKeyIdentifier)); - - } -diff -ur voms-api-java-3.0.5.orig/src/test/java/org/italiangrid/voms/test/ac/TestNoExtensionValidation.java voms-api-java-3.0.5/src/test/java/org/italiangrid/voms/test/ac/TestNoExtensionValidation.java ---- voms-api-java-3.0.5.orig/src/test/java/org/italiangrid/voms/test/ac/TestNoExtensionValidation.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/test/java/org/italiangrid/voms/test/ac/TestNoExtensionValidation.java 2014-12-17 09:19:10.761933034 +0100 -@@ -15,6 +15,7 @@ - */ - package org.italiangrid.voms.test.ac; - -+import java.io.IOException; - import java.security.InvalidKeyException; - import java.security.NoSuchAlgorithmException; - import java.security.SignatureException; -@@ -55,7 +56,8 @@ - - @Test - public void testNoExtensionValidation() throws InvalidKeyException, -- CertificateParsingException, SignatureException, NoSuchAlgorithmException { -+ CertificateParsingException, SignatureException, NoSuchAlgorithmException, -+ IOException { - - ProxyCertificateOptions options = new ProxyCertificateOptions( - cred.getCertificateChain()); diff --git a/voms-api-java-javadoc.patch b/voms-api-java-javadoc.patch deleted file mode 100644 index 237cb85..0000000 --- a/voms-api-java-javadoc.patch +++ /dev/null @@ -1,509 +0,0 @@ -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/ac/VOMSACLookupStrategy.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/ac/VOMSACLookupStrategy.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/ac/VOMSACLookupStrategy.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/ac/VOMSACLookupStrategy.java 2015-07-11 22:03:24.435478016 +0200 -@@ -32,6 +32,7 @@ - * This method defines how a set of VOMS Attribute Certificates is looked for - * in a certificate chain. - * -+ * @param certChain certificate chain - * @return a {@link List} of {@link ACParsingContext} that describes the - * lookup outcome - */ -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/ac/VOMSACValidator.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/ac/VOMSACValidator.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/ac/VOMSACValidator.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/ac/VOMSACValidator.java 2015-07-11 22:04:13.910971096 +0200 -@@ -63,7 +63,7 @@ - * about validation without relying on the registration of a - * {@link ValidationResultListener}. - * -- * @param validatedChain -+ * @param validatedChain validated chain - * @return a possibly empty list of {@link VOMSValidationResult} object - * providing access to validation results and related attributes - */ -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/ac/VOMSAttributesNormalizationStrategy.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/ac/VOMSAttributesNormalizationStrategy.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/ac/VOMSAttributesNormalizationStrategy.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/ac/VOMSAttributesNormalizationStrategy.java 2015-07-11 22:06:19.019217943 +0200 -@@ -35,7 +35,7 @@ - * Returns the normalized view of VOMS Authorization information starting from - * a list of VOMS Attribute certificates. - * -- * @param acs -+ * @param acs a list of VOMS Attribute certificates - * @return a possibly empty list {@link VOMSAttribute} object - */ - public List normalizeAttributes(List acs); -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/ac/VOMSValidationResult.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/ac/VOMSValidationResult.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/ac/VOMSValidationResult.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/ac/VOMSValidationResult.java 2015-07-11 23:17:04.240921381 +0200 -@@ -43,7 +43,7 @@ - * Default constructor. - * - * @param attributes -- * the attributes this validation result refer to -+ * the attributes this validation result refers to - * @param valid - * true in case of validation success, - * false otherwise -@@ -56,6 +56,8 @@ - /** - * This constructor is used to pass in a list of validation errors as well. - * -+ * @param attributes -+ * the attributes this validation result refers to - * @param valid - * true in case of validation success, - * false otherwise -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/asn1/VOMSACUtils.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/asn1/VOMSACUtils.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/asn1/VOMSACUtils.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/asn1/VOMSACUtils.java 2015-07-11 21:52:38.473040258 +0200 -@@ -82,10 +82,10 @@ - * Deserializes the VOMS Attribute certificates in a given certificate - * extension - * -- * @param vomsExtension -+ * @param vomsExtension VOMS extension - * @return the possybly empty {@link List} of {@link AttributeCertificate} - * extracted from a given extension -- * @throws IOException -+ * @throws IOException IO exception - */ - public static List getACsFromVOMSExtension( - byte[] vomsExtension) throws IOException { -@@ -141,7 +141,7 @@ - * the {@link X509Certificate} where the ACs will be searched - * @return the possibly empty {@link List} of {@link AttributeCertificate} - * objects extracted from the VOMS extension -- * @throws IOException -+ * @throws IOException IO exception - */ - public static List getACsFromCertificate( - X509Certificate cert) throws IOException { -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/credential/LoadCredentialsEventListener.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/credential/LoadCredentialsEventListener.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/credential/LoadCredentialsEventListener.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/credential/LoadCredentialsEventListener.java 2015-07-11 21:59:55.389394631 +0200 -@@ -25,10 +25,11 @@ - public interface LoadCredentialsEventListener { - - /** -- * Informs that credentials are been looked for in the locations passed as -+ * Informs that credentials have been looked for in the locations passed as - * argument. - * - * @param locations -+ * the locations where the credentials have been looked for - */ - public void notifyCredentialLookup(String... locations); - -@@ -37,6 +38,7 @@ - * passed as argument. - * - * @param locations -+ * the locations where the credentials have been loaded from - */ - public void notifyLoadCredentialSuccess(String... locations); - -@@ -48,7 +50,7 @@ - * the {@link Throwable} that caused the credential load operation to - * fail - * @param locations -- * the locations where the credentials where loaded from -+ * the locations where the credentials were loaded from - */ - public void notifyLoadCredentialFailure(Throwable error, String... locations); - } -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/examples/ValidationExample.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/examples/ValidationExample.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/examples/ValidationExample.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/examples/ValidationExample.java 2015-07-11 22:02:03.237668786 +0200 -@@ -58,11 +58,11 @@ - } - - /** -- * @param args -- * @throws IOException -- * @throws FileNotFoundException -- * @throws CertificateException -- * @throws KeyStoreException -+ * @param args arguments -+ * @throws KeyStoreException key store exception -+ * @throws CertificateException certificate exception -+ * @throws FileNotFoundException file not found exception -+ * @throws IOException IO exception - */ - public static void main(String[] args) throws KeyStoreException, - CertificateException, FileNotFoundException, IOException { -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/request/impl/AbstractVOMSProtocol.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/request/impl/AbstractVOMSProtocol.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/request/impl/AbstractVOMSProtocol.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/request/impl/AbstractVOMSProtocol.java 2015-07-11 22:36:27.944060573 +0200 -@@ -164,7 +164,7 @@ - /** - * Sets whether this protocol will skip SSL hostname checks - * -- * @param skipHostnameChecks -+ * @param skipHostnameChecks skip hostname checks - */ - public void setSkipHostnameChecks(boolean skipHostnameChecks) { - -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/request/impl/DefaultVOMSACService.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/request/impl/DefaultVOMSACService.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/request/impl/DefaultVOMSACService.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/request/impl/DefaultVOMSACService.java 2015-07-11 22:58:43.620615468 +0200 -@@ -513,7 +513,7 @@ - * Sets the http protocol implementation - * - * @param httpProtocol -- * the http protocol implementatino -+ * the http protocol implementatioh - * @return this {@link Builder} instance - */ - public Builder httpProtocol(VOMSProtocol httpProtocol) { -@@ -524,6 +524,10 @@ - - /** - * Sets the legacy protocol implementation -+ * -+ * @param legacyProtocol -+ * the legacy protocol implementatioh -+ * @return this {@link Builder} instance - */ - public Builder legacyProtocol(VOMSProtocol legacyProtocol) { - -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/request/impl/LegacyRequestSender.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/request/impl/LegacyRequestSender.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/request/impl/LegacyRequestSender.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/request/impl/LegacyRequestSender.java 2015-07-11 23:01:29.503319467 +0200 -@@ -97,6 +97,8 @@ - * - * @param acRequest - * the AC request parameters. See {@link VOMSACRequest}. -+ * @param endpoint -+ * VOMS server endpoint - * @param stream - * an output stream. - */ -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/request/impl/LegacyVOMSResponse.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/request/impl/LegacyVOMSResponse.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/request/impl/LegacyVOMSResponse.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/request/impl/LegacyVOMSResponse.java 2015-07-11 23:04:31.083184711 +0200 -@@ -37,7 +37,7 @@ - * Builds a VOMSResponse starting from a DOM an XML document (see - * {@link Document}). - * -- * @param res -+ * @param res XML response - */ - public LegacyVOMSResponse(Document res) { - -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/store/impl/DefaultVOMSTrustStore.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/store/impl/DefaultVOMSTrustStore.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/store/impl/DefaultVOMSTrustStore.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/store/impl/DefaultVOMSTrustStore.java 2015-07-11 23:12:10.653905564 +0200 -@@ -106,6 +106,8 @@ - /** - * Builds a list of trusted directories containing only - * {@link #DEFAULT_VOMS_DIR}. -+ * -+ * @return list of trusted directories - **/ - protected static List buildDefaultTrustedDirs() { - -@@ -118,6 +120,8 @@ - * - * @param localTrustDirs - * a non-null list of local trust directories -+ * @param listener -+ * trust store status listener - * @throws IllegalArgumentException - * when the list passed as argument is null - */ -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/store/impl/VOMSThread.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/store/impl/VOMSThread.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/store/impl/VOMSThread.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/store/impl/VOMSThread.java 2015-07-11 23:13:36.831790810 +0200 -@@ -32,6 +32,8 @@ - * the object whose run method is called. - * @param name - * the name of the new thread. -+ * @param handler -+ * uncaught exception handler - */ - public VOMSThread(Runnable target, String name, - UncaughtExceptionHandler handler) { -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/store/LSCInfo.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/store/LSCInfo.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/store/LSCInfo.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/store/LSCInfo.java 2015-07-11 23:49:42.371477209 +0200 -@@ -60,8 +60,8 @@ - * and hostname. - * - * The certificate chain description is a list of X.500 distinguished names -- * encoded as strings according to the OpenSSL slash-separated format, as in: -- * /C=IT/O=INFN/CN=INFN CA -+ * encoded as strings according to the OpenSSL slash-separated format, as -+ * in: @verbatim /C=IT/O=INFN/CN=INFN CA @endverbatim - * - * The first element in the description is the leaf certificate, while the - * last is the CA certificate. -@@ -75,7 +75,7 @@ - * Checks if the certificate chain description maintained in the LSC - * information matches the certificate chain passed as argument. - * -- * @param certChain -+ * @param certChain certificate chain - * @return true if the description matches, false - * otherwise - */ -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/util/CachingCertificateValidator.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/util/CachingCertificateValidator.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/util/CachingCertificateValidator.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/util/CachingCertificateValidator.java 2015-07-11 22:19:44.450154294 +0200 -@@ -132,7 +132,7 @@ - * Validates a certificate chain using the wrapped validator, caching the - * result for future validation calls. - * -- * @param certChain -+ * @param certChain certificate chain - * @return a possibly cached {@link ValidationResult} - * @see eu.emi.security.authn.x509.X509CertChainValidator#validate(java.security.cert.X509Certificate[]) - */ -@@ -187,7 +187,7 @@ - } - - /** -- * @param certPath -+ * @param certPath certificate path - * @return the {@link ValidationResult} - * @see eu.emi.security.authn.x509.X509CertChainValidator#validate(java.security.cert.CertPath) - */ -@@ -215,7 +215,7 @@ - } - - /** -- * @param listener -+ * @param listener validation listener - * @see eu.emi.security.authn.x509.X509CertChainValidator#addValidationListener(eu.emi.security.authn.x509.ValidationErrorListener) - */ - public void addValidationListener(ValidationErrorListener listener) { -@@ -224,7 +224,7 @@ - } - - /** -- * @param listener -+ * @param listener validation listener - * @see eu.emi.security.authn.x509.X509CertChainValidator#removeValidationListener(eu.emi.security.authn.x509.ValidationErrorListener) - */ - public void removeValidationListener(ValidationErrorListener listener) { -@@ -233,7 +233,7 @@ - } - - /** -- * @param listener -+ * @param listener validation listener - * @see eu.emi.security.authn.x509.X509CertChainValidator#addUpdateListener(eu.emi.security.authn.x509.StoreUpdateListener) - */ - public void addUpdateListener(StoreUpdateListener listener) { -@@ -242,7 +242,7 @@ - } - - /** -- * @param listener -+ * @param listener validation listener - * @see eu.emi.security.authn.x509.X509CertChainValidator#removeUpdateListener(eu.emi.security.authn.x509.StoreUpdateListener) - */ - public void removeUpdateListener(StoreUpdateListener listener) { -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/util/CertificateValidatorBuilder.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/util/CertificateValidatorBuilder.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/util/CertificateValidatorBuilder.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/util/CertificateValidatorBuilder.java 2015-07-11 22:23:13.028201344 +0200 -@@ -142,7 +142,7 @@ - /** - * Sets whether the created validator will be lazy in loading anchors - * -- * @param lazyness -+ * @param lazyness lazyness - * @return the builder object - */ - public CertificateValidatorBuilder lazyAnchorsLoading(boolean lazyness) { -@@ -227,6 +227,9 @@ - * @param validationErrorListener - * the listener that will receive notification about validation - * errors -+ * @param storeUpdateListener -+ * the listener that will receive notification about trust -+ * anchor store updates - * @param updateInterval - * the trust anchor store update interval - * @param namespaceChecks -@@ -259,6 +262,9 @@ - * @param validationErrorListener - * the listener that will receive notification about validation - * errors -+ * @param storeUpdateListener -+ * the listener that will receive notification about trust -+ * anchor store updates - * @param updateInterval - * the trust anchor store update interval - * @param namespaceChecks -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/util/CredentialsUtils.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/util/CredentialsUtils.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/util/CredentialsUtils.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/util/CredentialsUtils.java 2015-07-11 22:34:03.331626827 +0200 -@@ -62,11 +62,11 @@ - /** - * Serializes a private key to an output stream according to an encoding. - * -- * @param os -- * @param key -- * @param encoding -- * @throws IllegalArgumentException -- * @throws IOException -+ * @param os output stream -+ * @param key private key -+ * @param encoding private key encoding -+ * @throws IllegalArgumentException illegal argument exception -+ * @throws IOException IO exception - */ - public static void savePrivateKey(OutputStream os, PrivateKey key, - PrivateKeyEncoding encoding) throws IllegalArgumentException, IOException { -@@ -90,10 +90,10 @@ - * This method just delegates to canl, but provides a much more understandable - * signature. - * -- * @param os -- * @param key -- * @throws IllegalArgumentException -- * @throws IOException -+ * @param os output stream -+ * @param key private key -+ * @throws IllegalArgumentException illegal argument exception -+ * @throws IOException IO exception - */ - private static void savePrivateKeyPKCS8(OutputStream os, PrivateKey key) - throws IllegalArgumentException, IOException { -@@ -108,10 +108,10 @@ - * This method just delegates to canl, but provides a much more understandable - * signature. - * -- * @param os -- * @param key -- * @throws IllegalArgumentException -- * @throws IOException -+ * @param os output stream -+ * @param key provate key -+ * @throws IllegalArgumentException illegal argument exception -+ * @throws IOException IO exception - */ - private static void savePrivateKeyPKCS1(OutputStream os, PrivateKey key) - throws IllegalArgumentException, IOException { -@@ -125,16 +125,16 @@ - * Saves user credentials as a plain text PEM data.
- * Writes the user certificate chain first, then the user key. - * -- * @param os -- * @param uc -- * @param encoding -- * @throws UnrecoverableKeyException -- * @throws KeyStoreException -- * @throws IllegalArgumentException -- * @throws NoSuchAlgorithmException -- * @throws IOException -- * @throws NoSuchProviderException -- * @throws CertificateException -+ * @param os output stream -+ * @param uc user credential -+ * @param encoding private key encoding -+ * @throws UnrecoverableKeyException unrecoverable key exception -+ * @throws KeyStoreException key store exception -+ * @throws IllegalArgumentException illegal argument exception -+ * @throws NoSuchAlgorithmException no such algorithm exception -+ * @throws IOException IO exception -+ * @throws NoSuchProviderException no such provider exception -+ * @throws CertificateException certificate exception - */ - public static void saveProxyCredentials(OutputStream os, X509Credential uc, - PrivateKeyEncoding encoding) throws UnrecoverableKeyException, -@@ -174,15 +174,15 @@ - * Writes the user certificate chain first, then the user key, using the - * default encoding specified in {@link #DEFAULT_ENCONDING}. - * -- * @param os -- * @param uc -- * @throws UnrecoverableKeyException -- * @throws KeyStoreException -- * @throws IllegalArgumentException -- * @throws NoSuchAlgorithmException -- * @throws IOException -- * @throws NoSuchProviderException -- * @throws CertificateException -+ * @param os output stream -+ * @param uc user credendial -+ * @throws UnrecoverableKeyException unrecoverable key exception -+ * @throws KeyStoreException key store exception -+ * @throws IllegalArgumentException illegal argument exception -+ * @throws NoSuchAlgorithmException no such algorithm exception -+ * @throws IOException IO exception -+ * @throws NoSuchProviderException no such provider exception -+ * @throws CertificateException certificate exception - */ - public static void saveProxyCredentials(OutputStream os, X509Credential uc) - throws UnrecoverableKeyException, KeyStoreException, -@@ -202,13 +202,13 @@ - * the credential to be saved - * @param encoding - * the private key encoding -- * @throws IOException -- * @throws UnrecoverableKeyException -- * @throws KeyStoreException -- * @throws IllegalArgumentException -- * @throws NoSuchAlgorithmException -- * @throws NoSuchProviderException -- * @throws CertificateException -+ * @throws IOException IOException -+ * @throws UnrecoverableKeyException unrecoverable key exception -+ * @throws KeyStoreException key store exception -+ * @throws IllegalArgumentException illegal argument exception -+ * @throws NoSuchAlgorithmException no such algorithm exception -+ * @throws NoSuchProviderException no such provider exception -+ * @throws CertificateException certificate exception - */ - public static void saveProxyCredentials(String proxyFileName, - X509Credential uc, PrivateKeyEncoding encoding) throws IOException, -@@ -238,14 +238,16 @@ - * encoding specified in {@link #DEFAULT_ENCONDING}. - * - * @param proxyFileName -+ * the file where the proxy will be saved - * @param uc -- * @throws UnrecoverableKeyException -- * @throws KeyStoreException -- * @throws IllegalArgumentException -- * @throws NoSuchAlgorithmException -- * @throws NoSuchProviderException -- * @throws CertificateException -- * @throws IOException -+ * the credential to be saved -+ * @throws UnrecoverableKeyException unrecoverable key exception -+ * @throws KeyStoreException key store exception -+ * @throws IllegalArgumentException illegal argument exception -+ * @throws NoSuchAlgorithmException no such algorithm exception -+ * @throws NoSuchProviderException no such provider exception -+ * @throws CertificateException certificate exception -+ * @throws IOException IOException - */ - public static void saveProxyCredentials(String proxyFileName, - X509Credential uc) throws UnrecoverableKeyException, KeyStoreException, -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/util/VOMSFQANNamingScheme.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/util/VOMSFQANNamingScheme.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/util/VOMSFQANNamingScheme.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/util/VOMSFQANNamingScheme.java 2015-07-11 22:35:15.189339253 +0200 -@@ -96,7 +96,7 @@ - * syntax used by voms to identify roles. - * - * -- * @param roleName -+ * @param roleName role name - * @throws VOMSError - * If the string passed as argument doens not comply with the voms - * sytax. -diff -ur voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/VOMSAttribute.java voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/VOMSAttribute.java ---- voms-api-java-3.0.5.orig/src/main/java/org/italiangrid/voms/VOMSAttribute.java 2014-12-09 10:55:31.000000000 +0100 -+++ voms-api-java-3.0.5/src/main/java/org/italiangrid/voms/VOMSAttribute.java 2015-07-11 21:53:57.511827971 +0200 -@@ -117,7 +117,7 @@ - * This method checks whether the attributes are valid in a given time passed - * as argument. No validation is performed on the attributes. - * -- * @param time -+ * @param time time - * @return true if valid, false otherwise - */ - public boolean validAt(Date time); diff --git a/voms-api-java-testfix.patch b/voms-api-java-testfix.patch deleted file mode 100644 index 11a9c0b..0000000 --- a/voms-api-java-testfix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/test/java/org/italiangrid/voms/test/ac/TestACGeneration.java b/src/test/java/org/italiangrid/voms/test/ac/TestACGeneration.java -index 1faf709..bc7557c 100644 ---- a/src/test/java/org/italiangrid/voms/test/ac/TestACGeneration.java -+++ b/src/test/java/org/italiangrid/voms/test/ac/TestACGeneration.java -@@ -143,7 +143,7 @@ public class TestACGeneration { - - expiredCertCRLErrorMessage = newErrorMessage( - canlError, -- "CRL for an expired certificate was not resolved Cause: No CRLs found for issuer \"CN=Test CA, O=IGI, C=IT\""); -+ "CRL for an expired certificate was not resolved Cause: No CRLs found for issuer \"cn=Test CA,o=IGI,c=IT\""); - - final Date revocationDate = new Date(1348673124000L); - diff --git a/voms-api-java.spec b/voms-api-java.spec index b03ee1c..85b839e 100644 --- a/voms-api-java.spec +++ b/voms-api-java.spec @@ -1,36 +1,22 @@ Name: voms-api-java -Version: 3.0.5 -Release: 5%{?dist} +Version: 3.2.0 +Release: 1%{?dist} Summary: Virtual Organization Membership Service Java API Group: Development/Libraries License: ASL 2.0 URL: https://wiki.italiangrid.it/VOMS Source0: https://github.com/italiangrid/%{name}/archive/v%{version}.tar.gz -# Patch for bouncycastle 1.47+ (Fedora 21+, EPEL 7+) -Patch0: %{name}-bc147.patch # Disable tests using non-local network interface -Patch1: %{name}-no-local.patch -# Fix javadoc warnings/errors -Patch2: %{name}-javadoc.patch -# Modify test for canl-java 2.2.0 (Backport from upstream) -Patch3: %{name}-testfix.patch +Patch0: %{name}-no-local.patch BuildArch: noarch BuildRequires: maven-local -BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin) -BuildRequires: mvn(org.apache.maven.plugins:maven-compiler-plugin) -BuildRequires: mvn(org.apache.maven.plugins:maven-javadoc-plugin) -BuildRequires: mvn(org.apache.maven.plugins:maven-release-plugin) BuildRequires: mvn(eu.eu-emi.security:canl) -BuildRequires: mvn(org.bouncycastle:bcpkix-jdk15on) BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.mockito:mockito-core) -%if %{?fedora}%{!?fedora:0} -# Missing in EPEL BuildRequires: mvn(com.mycila.maven-license-plugin:maven-license-plugin) BuildRequires: mvn(net.jcip:jcip-annotations) -%endif %description The Virtual Organization Membership Service (VOMS) is an attribute authority @@ -52,29 +38,17 @@ Virtual Organization Membership Service (VOMS) Java API Documentation. %prep %setup -q %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 - -%pom_xpath_set "pom:project/pom:dependencies/pom:dependency[pom:artifactId='bcmail']/pom:groupId" "org.bouncycastle" -%pom_xpath_set "pom:project/pom:dependencies/pom:dependency[pom:artifactId='bcmail']/pom:artifactId" "bcpkix-jdk15on" %pom_remove_plugin org.codehaus.mojo:cobertura-maven-plugin -%if %{?fedora}%{!?fedora:0} %pom_xpath_inject "pom:project/pom:build/pom:plugins/pom:plugin[pom:groupId='com.mycila.maven-license-plugin']/pom:configuration/pom:excludes" ".xmvn/**" %pom_xpath_remove "pom:project/pom:build/pom:plugins/pom:plugin[pom:groupId='com.mycila.maven-license-plugin']/pom:configuration/pom:strictCheck" -%else -# Missing in EPEL -%pom_remove_plugin com.mycila.maven-license-plugin:maven-license-plugin -%pom_remove_dep net.jcip:jcip-annotations -%endif %build %mvn_build %install -%mvn_install -J target/site/javadoc/apidocs +%mvn_install %files -f .mfiles %doc AUTHORS README.md @@ -84,6 +58,10 @@ Virtual Organization Membership Service (VOMS) Java API Documentation. %license LICENSE %changelog +* Sun Feb 14 2016 Mattias Ellert - 3.2.0-1 +- Update to version 3.2.0 - matches canl-java 2.2.x +- Drop patches: voms-api-java-bc147.patch, -javadoc.patch and -testfix.patch + * Thu Feb 11 2016 Mattias Ellert - 3.0.5-5 - Backport fix for failing test due to new canl-java version