Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Regular Contributor
Posts: 76
Registered: ‎06-14-2013
My Device: Z10
My Carrier: PosteMobile
Accepted Solution

Cannot install the bar after signing it : cannot access member 'META-INF/AUTHOR.EC

Reading here :

https://developer.blackberry.com/native/documentation/core/com.qnx.doc.nfc/topic/manual/t_nfcdevguid...

I understood that I need to sign the app in order to communicate with the secure element. For testing purpose we have disabled the SIM security and we are able to send APDU flawlessly, but now we need to test the app in a real environment. To make the app work correctly we need to sign it with our PKCS12 file keystore. This file .p12 has been generated externally from the BB10 SDK using openssl but it is correctly imported in the SDK indeed the Author label shows CN='My Company' as expected.

The same name is present in the app bar-descriptor.xml, more precisely in the 'author' tag.


I'm able to sign the .bar package correctly from the SDK. I have signed the app by File->Export->Release Build->Device Release->Finish. The problem is that when i try to install the bar i get the error:
cannot access member 'META-INF/AUTHOR.EC'. Looking at the .bar content we cannot find this file in the META-INF folder but we don't know why and how to generate it.

The content of the META-INF folder is the following:


META-INF/MANIFEST.MF

META-INF/AUTHOR.SF

META-INF/AUTHOR.RSA

META-INF/RDK.SF

META-INF/RDK.EC


Any help is appreciated.
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Cannot install the bar after signing it : cannot access member 'META-INF/AUTHOR.EC

It seems likely that EC is for Elliptic Curve whereas yours is RSA, a different encryption technology. My wild guess would be this is the cause...

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Retired
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Cannot install the bar after signing it : cannot access member 'META-INF/AUTHOR.EC

Hi

 

you only need this additional signature applied using blackberry-signer if your SIM uses an ACF.

 

Assuming that it does, you should create your bar file via the Release Build process that you mention *first* and then sign additionally and from the command line using the blackberry-signer procedure at the page you linked to.

 

Regards

 

Martin

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Regular Contributor
Posts: 76
Registered: ‎06-14-2013
My Device: Z10
My Carrier: PosteMobile

Re: Cannot install the bar after signing it : cannot access member 'META-INF/AUTHOR.EC

Yes I think it could be the cause.

I didn't know that EC was need. The problem now is that my certificate is signed with an RSA key and i need to change the sign algoritm to EC.


Is there a way to do it with openssl ?

If I generate the bar without signature and then i run this command:

blackberry-signer -keystore MyKStore.p
12 -sigfile GPACACF -sigalg SHA512withRSA -storepass mypass -verbose MyBar-1_0_0_1.bar author

i get the following error:

result::failure 881 required signatures missing (RDK, AUTHOR)

This means that RDK and AUTHOR signature files are needed. I tried also to put Application-Development-Mode: true before signing the app and the error disappear but in this way I don't get a "release" package and furthermore the app crash on launch for unknown reasons and the app page is never showed.

 

 

Retired
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Cannot install the bar after signing it : cannot access member 'META-INF/AUTHOR.EC

I'm double checking the procedure with our development team. Bear with me and I will report back asap.

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Regular Contributor
Posts: 76
Registered: ‎06-14-2013
My Device: Z10
My Carrier: PosteMobile

Re: Cannot install the bar after signing it : cannot access member 'META-INF/AUTHOR.EC

So in this case i need a .p12 generated with the BB SDK to sign the app and then i have to sign the app further with my .p12. 
Do I get it ?


mwoolley wrote:

Hi

 

you only need this additional signature applied using blackberry-signer if your SIM uses an ACF.

 

Assuming that it does, you should create your bar file via the Release Build process that you mention *first* and then sign additionally and from the command line using the blackberry-signer procedure at the page you linked to.

 

Regards

 

Martin


Retired
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Cannot install the bar after signing it : cannot access member 'META-INF/AUTHOR.EC

No, that's not correct,

 

There are two stages to signing required here.

 

1. Sign your application by created a "release build" in the standard way. This produces a bar file that is signed per standard BlackBerry 10 requirements. It has nothing to do with NFC or ACF requirements. You do this using the Momentics IDE.

 

2. Take the bar file produced in step (1) and sign it again using your own certificate but this time sign from the command line using the blackberry-signer tool as shown on the page you linked to in your post:

 

https://developer.blackberry.com/native/documentation/core/com.qnx.doc.nfc/topic/manual/t_nfcdevguid...

 

If you follow this procedure correctly, META-INF should contain files called GPACACF.RSA and GPACRSA.SF.

 

Please give this a try and let me know how it goes.

 

Regards

 

Martin

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Regular Contributor
Posts: 76
Registered: ‎06-14-2013
My Device: Z10
My Carrier: PosteMobile

Re: Cannot install the bar after signing it : cannot access member 'META-INF/AUTHOR.EC

Thanks a lot.

The suggested procedure works and I'm able to communicate with the secure element.

Retired
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Cannot install the bar after signing it : cannot access member 'META-INF/AUTHOR.EC

Excellent :-)

 

Could you mark my last post as the solution please?

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim