Re: Current master fails to compile tests: TestSMIMESignEncrypt.java

Uri Blumenthal <[email protected]> Tue, 6 Nov 2018 02:36:51 +0000
Newsgroups gmane.comp.encryption.bouncy-castle.devel
Message-ID <[email protected]>
The code I pulled from GitHub 2 hours ago, compiles cleanly on my setup.

Thanks!

> On Nov 5, 2018, at 18:11 , Uri Blumenthal <uri-DPNOqEs/[email protected]> wrote:
> 
> Locale: US
> JVM: latest JDK-8
> 
> Probably repos did get out of sync.
> 
> Sent from my test iPhone
> 
> On Nov 5, 2018, at 17:39, David Hook <dgh-rTAZ0PM/[email protected] <mailto:dgh-rTAZ0PM/[email protected]>> wrote:
> 
>> 
>> The test class is fixed... not sure what happened there, it looks like the pull from the branch didn't quite grab everything. I have a feeling we may have gotten out of sync.
>> 
>> We're not seeing the I18n issue, would you just confirm both the JVM and the locale it thinks it's running in? We may be able to work out what's going from that.
>> 
>> Thanks,
>> 
>> David
>> 
>> On 6/11/18 2:57 am, Uri Blumenthal wrote:
>>> The following patch is required to get the tests compile:
>>> 
>>> diff --git a/pkix/src/test/java/org/bouncycastle/mime/test/TestSMIMESignEncrypt.java b/pkix/src/test/java/org/bouncycastle/mime/test/TestSMIMESignEncrypt.java
>>> index 479ee8e96..97d094510 100755
>>> --- a/pkix/src/test/java/org/bouncycastle/mime/test/TestSMIMESignEncrypt.java
>>> +++ b/pkix/src/test/java/org/bouncycastle/mime/test/TestSMIMESignEncrypt.java
>>> @@ -17,6 +17,7 @@
>>>  import org.bouncycastle.cert.jcajce.JcaX509CertificateHolder;
>>>  import org.bouncycastle.cms.CMSAlgorithm;
>>>  import org.bouncycastle.cms.CMSException;
>>> +import org.bouncycastle.cms.CMSTypedStream;
>>>  import org.bouncycastle.cms.OriginatorInformation;
>>>  import org.bouncycastle.cms.RecipientInformation;
>>>  import org.bouncycastle.cms.RecipientInformationStore;
>>> @@ -46,7 +47,8 @@
>>>  import org.bouncycastle.util.encoders.Base64;
>>>  import org.bouncycastle.util.io.Streams;
>>>  
>>> -public class TestSMIMESignEncrypt_commented
>>> +//public class TestSMIMESignEncrypt_commented
>>> +public class TestSMIMESignEncrypt
>>>      extends TestCase
>>>  {
>>>      private static final String BC = BouncyCastleProvider.PROVIDER_NAME;
>>> 
>>> It still isn’t enough to pass .i18n tests:
>>> 
>>> Can't find entry arguments.text in resource file org.bouncycastle.i18n.test.I18nTestMessages.
>>> 
>>> org.bouncycastle.i18n.MissingEntryException: Can't find entry arguments.text in resource file org.bouncycastle.i18n.test.I18nTestMessages.
>>> at org.bouncycastle.i18n.LocalizedMessage.getEntry(LocalizedMessage.java:169)
>>> at org.bouncycastle.i18n.test.LocalizedMessageTest.testLocalizedArgs(LocalizedMessageTest.java:150)
>>> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
>>> at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
>>> at junit.extensions.TestSetup.run(TestSetup.java:27)
>>> 
>>> Can't find entry hello.text in resource file org.bouncycastle.i18n.test.I18nTestMessages.
>>> 
>>> org.bouncycastle.i18n.MissingEntryException: Can't find entry hello.text in resource file org.bouncycastle.i18n.test.I18nTestMessages.
>>> at org.bouncycastle.i18n.LocalizedMessage.getEntry(LocalizedMessage.java:169)
>>> at org.bouncycastle.i18n.test.LocalizedMessageTest.testGetEntry(LocalizedMessageTest.java:45)
>>> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
>>> at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
>>> at junit.extensions.TestSetup.run(TestSetup.java:27)
>>
smime.p7s (application/pkcs7-signature, 1.8 KB) - not displayed