Code Monkey home page Code Monkey logo

Comments (11)

cbaker6 avatar cbaker6 commented on August 18, 2024

@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.

aleemrazzaq avatar aleemrazzaq commented on August 18, 2024

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.

cbaker6 avatar cbaker6 commented on August 18, 2024

@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.

aleemrazzaq avatar aleemrazzaq commented on August 18, 2024

@cbaker6 Did you checked my latest updated code. Its tested and working fine. https://github.com/aleemrazzaq/CSR_EC_256

from ios-csr.

cbaker6 avatar cbaker6 commented on August 18, 2024

@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.

aleemrazzaq avatar aleemrazzaq commented on August 18, 2024

@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.

asadsam avatar asadsam commented on August 18, 2024

@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.

cbaker6 avatar cbaker6 commented on August 18, 2024

@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.

aleemrazzaq avatar aleemrazzaq commented on August 18, 2024

@asadsam Wait for me, soon I'll upload code managed and proper CSR generation with EC and RSA too.

from ios-csr.

aleemrazzaq avatar aleemrazzaq commented on August 18, 2024

@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.

aleemrazzaq avatar aleemrazzaq commented on August 18, 2024

@cbaker6 Kindly check this repo. https://github.com/aleemrazzaq/iOSCSR

from ios-csr.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.