You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this repo - it's the only place I've been able to find code that can generate a self-signed certificate without using loads of deprecated CDSA/OpenSSL APIs!
One thing I am trying to figure out though, is how to replace kCertTemplate with my own certificate template. Mainly I would like to do this so that my certs can appear in the Keychain with a name relating to my own app (Hammerspoon), rather than "Anonymous".
I generated myself a CA and then created/signed a certificate from that, did the hexdump and replaced the contents of kCertTemplate with the first 499 bytes of my certificate, but SecItemAdd() returns an error that the certificate format is invalid.
My suspicion is that this is because the various kFooOffset values in MYAnonymousIdentity.m are hard-coded for the particular certificate you generated.
So, I was wondering if it would be possible to get some more information about how you generated the template certificate and figured out those offsets.
(I did also attempt to use the MyCrypto code to generate a certificate completely from scratch, but it seemed like a pretty large amount of code to drop into a tiny plugin that happens to need a self-signed certificate!)
The text was updated successfully, but these errors were encountered:
I continued to bash my head against this, and figured out how to easily regenerate the cert template and offset values. Still might be handy to document somehow, to help folk figure this out:
Hey
Thanks for this repo - it's the only place I've been able to find code that can generate a self-signed certificate without using loads of deprecated CDSA/OpenSSL APIs!
One thing I am trying to figure out though, is how to replace kCertTemplate with my own certificate template. Mainly I would like to do this so that my certs can appear in the Keychain with a name relating to my own app (Hammerspoon), rather than "Anonymous".
I generated myself a CA and then created/signed a certificate from that, did the hexdump and replaced the contents of kCertTemplate with the first 499 bytes of my certificate, but SecItemAdd() returns an error that the certificate format is invalid.
My suspicion is that this is because the various kFooOffset values in MYAnonymousIdentity.m are hard-coded for the particular certificate you generated.
So, I was wondering if it would be possible to get some more information about how you generated the template certificate and figured out those offsets.
(I did also attempt to use the MyCrypto code to generate a certificate completely from scratch, but it seemed like a pretty large amount of code to drop into a tiny plugin that happens to need a self-signed certificate!)
The text was updated successfully, but these errors were encountered: