Can we donate extra data allowance to that user and cover any cost or will the app not be able to save more data until the user has deleted something?
Post
Replies
Boosts
Views
Activity
First of all I know MD5 is "broken" and we shouldn't be using it but it's not my choice and there is legacy code I need to work with so for now at least I need to sign some data using MD5 and a RSA signing Key.
I think this is enough to explain the problem but I can share more code if needed.
I'm using this to sign:
let result = SecKeyRawSign(privateKey, SecPadding.PKCS1MD5, digestData.arrayOfBytes(), digestData.count, &signatureBytes, &signatureDataLength)
But that throws the error OSStatusCode -50 (parameter error from the Security framework)
If I change the padding to SecPadding.PKCS1SHA256 it works and after testing all the SecPadding options:
Fails with OSStatus -50:
OAEP
sigRaw
PKCS1MD2
PKCS1MD5
Works:
PKCS1
PKCS1SHA1
PKCS1SHA224
PKCS1SHA256
PKCS1SHA384
PKCS1SHA512
The digestData is created using CC_MD5 no matter which padding I've used so its stranger that it works with the SHA padding but not with MD5.
I'm getting a similar error when attempting to do this using the SwCrypt library, when using MD5 & PKCS1 padding I get the
OSStatus -4300 which is a parameter error from CommonCrypto.
let result = try CC.RSA.sign(paramString.data(using: .utf8)!, derKey: der, padding: .pkcs15, digest: .md5, saltLen: 0)
However I don't get an error if using the pss padding option.
So my question/s then, why am I getting this parameter error when using MD5 and PKCS1? Is it because use of MD5 is deprecated or could there be some problem with another parameter?
Any pointers would be greatly appreciated, I've been stuck trying to implement this all week.
I'm trying to add an Objective-C framework to a Widget Extension but it fails to build when I try to initialise a instance of the main public class.
I have a bridging header and the compiler recognises it - code completion works in the widget code - but I have a number of undefined symbols errors.
Should it be possible? Is there some objc/c/c++ library I need to add to get it to work?
Undefined symbols for architecture arm64:
"operator new[](unsigned long)", referenced from:
ByteArray::alloc(int) in TheFramework.a(SomeClass.o)
ByteArray::alloc(int) in TheFramework.a(SomeOtherClass.o)
"operator new(unsigned long)", referenced from:
-[TheFramework initWithName:] in TheFramework.a(SomeClass.o)
SomeClass::CreatePublicKey() in TheFramework.a(SomeOtherClass.o)
"___cxa_begin_catch", referenced from:
___clang_call_terminate in TheFramework.a(SomeClass.o)
"std::terminate()", referenced from:
___clang_call_terminate in TheFramework.a(SomeClass.o)
"___gxx_personality_v0", referenced from:
-[TheFramework dealloc] in TheFramework.a(SomeClass.o)
-[TheFramework initWithName:] in TheFramework.a(SomeClass.o)
-[TheFramework getDataFromXml:] in TheFramework.a(SomeClass.o)
-[TheFramework getCommandFromXml:] in TheFramework.a(SomeClass.o)
-[TheFramework setConnectionDetails:] in TheFramework.a(SomeClass.o)
-[TheFramework connect:] in TheFramework.a(SomeClass.o)
-[TheFramework connect] in TheFramework.a(SomeClass.o)
...
"operator delete(void*)", referenced from:
-[TheFramework dealloc] in TheFramework.a(SomeClass.o)
-[TheFramework initWithName:] in TheFramework.a(SomeClass.o)
ByteArray::decRef() in TheFramework.a(SomeClass.o)
SomeClass::Initialise() in TheFramework.a(SomeOtherClass.o)
SomeClass::~SomeClass() in TheFramework.a(SomeOtherClass.o)
SomeClass::CreatePublicKey() in TheFramework.a(SomeOtherClass.o)
ByteArray::decRef() in TheFramework.a(SomeOtherClass.o)
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Edit:
It is included in the Library Search Paths for the extension
Edit 2:
TheFramework is using C++
I'm trying to create a Workflow Extension for Final Cut Pro but I'm not able to do any more than install it.
I've created a Mac app and added the Workflow Extension, the app builds and runs and shows up in FCP. When I launch the extension in FCP a window opens for the extension showing a label "Loading", the default extension icon (puzzle piece) and a progress indicator which does not animate. Nothing else happens, the default view included in the extension (that belonging to {ExtensionName}ViewController does not appear. The default view contains a TextField "FCP Workflow Extension" so I am expecting that to show.
I have compared this behaviour with Ripple Training's workflow extension and this shows the same loading view before cross dissolving to their custom UI.
When the Mac app is running from Xcode and the extension is running inside of FCP I can use Xcode's Attach to Process to attach to the extension but as the view of the {ExtensionName}ViewController does not load I can not use breakpoints or print statements to get any information and that is the only class included in the extension.
What am I missing?