46
46
import org .bouncycastle .asn1 .smime .SMIMECapability ;
47
47
import org .bouncycastle .asn1 .smime .SMIMECapabilityVector ;
48
48
import org .bouncycastle .asn1 .teletrust .TeleTrusTObjectIdentifiers ;
49
+ import org .bouncycastle .cert .X509AttributeCertificateHolder ;
49
50
import org .bouncycastle .cert .X509CertificateHolder ;
50
- import org .bouncycastle .cert .jcajce .JcaAttrCertStore ;
51
51
import org .bouncycastle .cert .jcajce .JcaCertStore ;
52
- import org .bouncycastle .cert .jcajce .JcaX509AttributeCertificateHolder ;
53
52
import org .bouncycastle .cms .DefaultSignedAttributeTableGenerator ;
54
53
import org .bouncycastle .cms .SignerInformation ;
55
54
import org .bouncycastle .cms .SignerInformationStore ;
62
61
import org .bouncycastle .mail .smime .util .CRLFOutputStream ;
63
62
import org .bouncycastle .mail .smime .util .FileBackedMimeBodyPart ;
64
63
import org .bouncycastle .operator .jcajce .JcaDigestCalculatorProviderBuilder ;
64
+ import org .bouncycastle .util .CollectionStore ;
65
65
import org .bouncycastle .util .Store ;
66
- import org .bouncycastle .x509 .X509AttributeCertificate ;
67
66
68
67
public class NewSMIMESignedTest
69
68
extends TestCase
@@ -808,9 +807,13 @@ public void testWithAttributeCertificate()
808
807
809
808
gen .addCertificates (certs );
810
809
811
- X509AttributeCertificate attrCert = CMSTestUtil .getAttributeCertificate ();
810
+ X509AttributeCertificateHolder attrCert = CMSTestUtil .getAttributeCertificate ();
812
811
813
- Store store = new JcaAttrCertStore (attrCert );
812
+ List attrCertList = new ArrayList ();
813
+
814
+ attrCertList .add (attrCert );
815
+
816
+ Store store = new CollectionStore (attrCertList );
814
817
815
818
gen .addAttributeCertificates (store );
816
819
@@ -822,7 +825,7 @@ public void testWithAttributeCertificate()
822
825
823
826
Store attrCerts = s .getAttributeCertificates ();
824
827
825
- assertTrue (attrCerts .getMatches (null ).contains (new JcaX509AttributeCertificateHolder ( attrCert ) ));
828
+ assertTrue (attrCerts .getMatches (null ).contains (attrCert ));
826
829
}
827
830
828
831
private void rsaPSSTest (String digest , String digestOID )
0 commit comments