Comments (11)
@aleemrazzaq it's possible you may have converted the OID incorrectly. Look at this guide to translate OID's to bytes for ANS.1 (Look at comment section on page): https://msdn.microsoft.com/en-us/library/bb540809(v=vs.85).aspx
Also, you can check my code to see how I converted other OID's: https://github.com/cbaker6/iOS-csr-swift/blob/master/iOS-csr-swift/CertificateSigningRequest.swift
You can also check my repo here: https://github.com/cbaker6/iOS-csr-swift
Good luck!
from ios-csr.
I've done R&D and finally get CSR with EC from same SCCSR class, kindly have a look at this.
https://github.com/aleemrazzaq/CSR_EC_256
from ios-csr.
@aleemrazzaq I tried your version, but it didn't compile. When I fixed the bugs, it output a CSR, but the CSR wasn't correct as the more changes that need to be done to SCCSR to support EC.
Feel free to look and try my Swift project which now supports EC: https://github.com/cbaker6/CertificateSigningRequestSwift
from ios-csr.
@cbaker6 Did you checked my latest updated code. Its tested and working fine. https://github.com/aleemrazzaq/CSR_EC_256
from ios-csr.
@aleemrazzaq yes, that is the code I tried. It outputs a CSR, but it's not built correctly For example, you place the public key in the CSR twice, which isn't correct. In addition, the public key section for ECC CSRs is slightly different than RSA which your code doesn't address. I recommend you verify the CSR's generated by your code here: https://redkestrel.co.uk/products/decoder/. If you compare your CSR to an openssl ssl generated CSR, you will see that it's not correct.
You can look at my Swift code (https://github.com/cbaker6/CertificateSigningRequestSwift) to see how I got it working and implement the fixes in objective-c.
from ios-csr.
@cbaker6 I checked your code and its written very good, appreciated!. Actually the thing is missing in my code is DER encode Public key, which I already used in my code with other class. I'll get some time to create separate Framework for this plus also attached sample how to use this, soon I'll update so you'll have look into that. Thanks.
from ios-csr.
@cbaker6 do you have code for generating the CSR with EC in Objective C?
@aleemrazzaq i have followed you through your question on stackoverflow till here, really appreciate your efforts that you have reached so far. Could you please help me creating CSR with EC keys in Objective C. Really appreciate you effort guys, thanks.
from ios-csr.
@asadsam sorry, I haven't coded in obj-c in years. It shouldn't be too hard to port the additions I made in CertificateSigningRequestSwift for EC into ios-csr. The biggest changes are in:
- Adding OBJECT_ecEncryptionNULL, OBJECT_ecPubicKey, SEQUENCE_OBJECT_sha1WithECEncryption, SEQUENCE_OBJECT_sha256WithECEncryption
- buildPublicKeyInfo (mods here)
- adding getPublicKey
from ios-csr.
@asadsam Wait for me, soon I'll upload code managed and proper CSR generation with EC and RSA too.
from ios-csr.
@asadsam Kindly check my this repo https://github.com/aleemrazzaq/iOSCSR
This works with both RSA and EC plus there is also description on how to create CSR.
Feel free to any query.
from ios-csr.
@cbaker6 Kindly check this repo. https://github.com/aleemrazzaq/iOSCSR
from ios-csr.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ios-csr.