DimensionDev / BouncyCastle-ObjC

Objective-C Bouncy Castle Pod
GNU Affero General Public License v3.0
4 stars 1 forks source link

add pkix (CMS) support #5

Open ferencIOS opened 3 years ago

ferencIOS commented 3 years ago

Hi to all,

as the title suggests I would like to understand if there is a possibility to add the pkix module (which contains the cms package).

I am trying to compile BC v1.69 but also following what is reported in thegenerate.sh, Xcode gives me errors like this:

Implicit declaration of function 'OrgBouncycastlePqcCryptoXmssDigestUtil_getDigestOIDWithNSString_' is invalid in C99

seems to be a mismatch in the class names and function names generated by j2objc

FOUNDATION_EXPORT OrgBouncycastleAsn1ASN1ObjectIdentifier *OrgBouncycastlePqcCryptoLmsDigestUtil_getDigestOIDWithNSString_(NSString *name);

The source code that is present in the repo which version of BC does it refer to? Have any changes been made to the java files?

Thanks!

MainasuK commented 3 years ago

Sorry. That's repo is now lack maintenance because we now using gopenpgp instead.

The core idea of that project is using J2ObjC to convert BouncyCastle from Java to ObjC.

The Xcode will flat all files in the same folder when build. Due to Java using the same file name (package name) likes: org.util.AClass and org.data.AClass. The Xcode will fail to compile. You need to use some rename tool to set a different name for "AClass".

Another issue is Mirror may not work and needs a patch in high-level code. I can not give any guarantee about this. The folker must set unit tests then use that framework in the production.

Finally. I recommend use swift-crypto and other native wrappers.