Closed AdrianaPineda closed 8 years ago
I'll look into it tomorrow. I have a deadline soon. Thanks for reporting.
@FredericJacobs awesome. Thank you! If I can help you in some way, just let me know
Adding the arch to the ARCHS list should work. But no time to test today.
https://github.com/FredericJacobs/OpenSSL-Pod/blob/master/1.0.208/OpenSSL.podspec#L20
@FredericJacobs I tried doing that but its not working for me. I'm testing other changes and I'll write back if it works
@FredericJacobs did you have any chance to look at this? Thanks!
Do you have a sample project?
@FredericJacobs not a public one, but I can create one if you want
@AdrianaPineda That would be helpful.
@FredericJacobs I did one here https://github.com/AdrianaPineda/testWatch2, let me know if it helps
@AdrianaPineda Thanks for providing that. But I'm not getting the same error you originally reported. Can you reproduce it on the project you provided?
@FredericJacobs are you building it for a real device, or simulator? The error happens just when you try to run a real device
@FredericJacobs were you able to get the error on a real device?
Sadly not.
I tried doing that but its not working for me
What did it say after adding the new architecture to the list of build targets?
@FredericJacobs it takes a while and it crashes when building for armv7k
Building openssl-1.0.2x for ... armv7k Please stand by...
/Users/apineda/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/executable.rb:70:in
execute_command' /Users/apineda/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/executable.rb:27:in
block in executable' /Users/apineda/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/pod_source_preparer.rb:64:in `block (2 levels) in run_prepare_command' ...
Looks like the issue is that Bitcode is required for watchOS, I think we'll have to make a Bitcode option for those targeting watchOS.
For iOS apps, bitcode is the default, but optional. For watchOS and tvOS apps, bitcode is required.
@FredericJacobs do you have an ETA for this bitcode option? Thanks!
@AdrianaPineda What crypto operation do you want to do on the Watch?
@FredericJacobs Im working on an app that decrypts a secret received from a server.
@AdrianaPineda You probably want to do the crypto operations on the iOS device and pass the results back and forth using the Watch Connectivity framework: https://developer.apple.com/library/watchos/documentation/WatchConnectivity/Reference/WatchConnectivity_framework/index.html#//apple_ref/doc/uid/TP40015269
@AdrianaPineda:
Im working on an app that decrypts a secret received from a server.
Does it use AES? Do you need P256? Let me know what operation you need and we can figure it out.
@chrisballinger thanks. I going to try that one out :) @FredericJacobs yes Im using AES. Im going to try to remove OpenSSL from the watch as @chrisballinger suggested and if it works then there is no need to update the pod :)
@AdrianaPineda I strongly recommend you to use CommonCrypto that is provided by Apple instead of OpenSSL if you're going to do crypto operations on the Watch. It's safer against some Bitcode attacks (affecting timing of crypto operations) that I wrote previously about.CommonCrypto is open-source.
CCCryptorStatus cryptStatus = CCCrypt(kCCEncrypt, kCCAlgorithmAES128, kCCOptionPKCS7Padding,
keyPtr, kCCKeySizeAES256,
NULL /* initialization vector (optional) */,
[self bytes], dataLength, /* input */
buffer, bufferSize, /* output */
&numBytesEncrypted);
@FredericJacobs thanks! I exclude OpenSSL for the watch app, and I was able to run on a real device. I will definitely migrate to CommonCrypto. Thank you very much for your help!
Hi I run in to a problem today. I am using openssl pod to generate ecc key pair in my ios app. From that key pair I generate csr using ecdsa sign... I send that to server and I get back server cert witch I sign using my ecc private key.... to get client certificate in PKCS12 format. From that point I use that PKCS12cliet cert for TLS communication....
I need to support watchos also. And from this discussion I will not be able to use this openssl pod on watchos?
If there is any way to use functions I need from openssl lib on watchos?
Or does anybody now how can I do all of described in cryptocommon lib? I cant find good documentation?
thx
Hi! Im trying to integrate this pod in my watchOS 2 target, but Im getting the following error:
ld: file is universal (5 slices) but does not contain a(n) armv7k slice: .../Pods/OpenSSL/lib/libssl.a file '.../Pods/OpenSSL/lib/libssl.a' for architecture armv7k
Do you support arch armv7k?
Thanks!