Quantcast

PKIData bug in bcprov-jdk15on-157b09.tar.gz

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

PKIData bug in bcprov-jdk15on-157b09.tar.gz

Na Yu

Hello,


I tried to use the PKIData class in package org.bouncycastle.asn1.cmc in the latest beta release bcprov-jdk15on-157b09.tar.gz

There are bugs in the method "public PKIData(ASN1Sequence seq)​". 


1. Line 55-60:

        s = ((ASN1Sequence)seq.getObjectAt(1));
        reqSequence = new TaggedRequest[s.size()];
        for (int t = 0; t < controlSequence.length; t++)
        {
            reqSequence[t] = TaggedRequest.getInstance(s.getObjectAt(t));
        }

     In Line 57, "controlSequence.length" should be "reqSequence.length". 

2. Line 69-74:
        s = ((ASN1Sequence)seq.getObjectAt(3));
        otherMsgSequence = new OtherMsg[s.size()];
        for (int t = 0; t < cmsSequence.length; t++)
        {
            otherMsgSequence[t] = OtherMsg.getInstance(s.getObjectAt(t));
        }

      In Line 71, "cmsSequence.length" should be "otherMsgSequence​.length". 


Please help to check this problem and fix it in the next release.

Thanks,
Na






Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PKIData bug in bcprov-jdk15on-157b09.tar.gz

David Hook-3
Hi Na,

Thanks for the report.

157b10 is now available in the betas area. This includes this patch as well the latest changes to the BC TLS API.

https://downloads.bouncycastle.org/betas/

Regards,

David

On 25/03/17 13:39, Na Yu wrote:

Hello,


I tried to use the PKIData class in package org.bouncycastle.asn1.cmc in the latest beta release bcprov-jdk15on-157b09.tar.gz

There are bugs in the method "public PKIData(ASN1Sequence seq)​". 


1. Line 55-60:

        s = ((ASN1Sequence)seq.getObjectAt(1));
        reqSequence = new TaggedRequest[s.size()];
        for (int t = 0; t < controlSequence.length; t++)
        {
            reqSequence[t] = TaggedRequest.getInstance(s.getObjectAt(t));
        }

     In Line 57, "controlSequence.length" should be "reqSequence.length". 

2. Line 69-74:
        s = ((ASN1Sequence)seq.getObjectAt(3));
        otherMsgSequence = new OtherMsg[s.size()];
        for (int t = 0; t < cmsSequence.length; t++)
        {
            otherMsgSequence[t] = OtherMsg.getInstance(s.getObjectAt(t));
        }

      In Line 71, "cmsSequence.length" should be "otherMsgSequence​.length". 


Please help to check this problem and fix it in the next release.

Thanks,
Na







Loading...