Tuesday, April 3, 2012

Re: [android-developers] Get signed data content (PKCS#7)

On Wed, Apr 4, 2012 at 3:57 AM, garaus <m.shumov@gmail.com> wrote:
> WebService(C#) generates response to Android device request. contentBytes is
> an xml file signed with self-generated cert.
>
...
>
> if tag is not 0 (in my case 28) isConstructed will be true. inside of switch
> there is no case for tag 28 and exception is generated. However inside
> of createPrimitiveDERObject method which is called after "if condition"
> there is switch with primitives where #28 tag present, but it will not get
> there because of isConstructed condition always be not equal 0. Who knows
> why it's built this way? If isConstructed were false it would probably work
> correct.
>
>

#28 is UniversalString, maybe the version you are using doesn't support
it or it's a bug. Are you using the Android built-in BouncyCastle version?
On what version of Android? It is updated for new releases, so if you
are using something like Froyo, it could be quite old.

> Is there any other (android-native) way to get signed/enveloped content?
>

Not really. Get the latest BouncyCastle library, and try it on your computer.
If it works, change the package name with jarjar, and incorporate it
in your apk.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate