I'm investigating the HTML5 attribute Keygen and discovered that it sends this data on a Form POST to the server. Here is an example POST:
MIICQDCCASgwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCXZtZkfOZOvCaMGVeFqCyhZdvs1NAP2+SwgE7Bz+JxSqVVkPAF+vyQ6dUvUNv2xtgeXnKt5Vz6lO8CoF3W9lsdKjLZWAPYfnAbjmoXHGFFY5uxFCyLUZAi+wrPmH2yorzJDTLC07hAfxb3XFRX6OSCYKUnF4L1g+5PtCxkQGaQ0Nd8K9GWffzAw915H7zsADB4TqK4vkyOItJ5RXaI+G+l9rb7yQeK6cd7P6OaIpWJctErv6m/BIlTuMOtYlZig29VWqc/0/J++QS49pbNrKULf+2GUheQ1JleA9wzy5ECUfkfboU0NoZt1Co9MSOJ0J+dSND4zs09kFNawFF1bXtHAgMBAAEWADANBgkqhkiG9w0BAQQFAAOCAQEAJwemsDE/5s3cYTv72sZ4ScKfxw0ROorxcmmmml3v1o9kepCirI9DmNlGWk5yVaAfP647YkLVF8xitdqr0c2ixboihoPsYuQH7h5CLFWv42SKddH5QzsfM/3JVwvxDw38v6kgWNcl1kTiz/1vXZZYBasjfmuosW4IGtZYS/JY6Zjq11BFi8dBvzGEyKu6eppssDZRJ/JGPuTudWiZqsVhxyW6pdz8weHpEBnUAFUdyGOyKJj5BqTRyuYbo/VKNxdcIo1Grs1VW2rD+0iEFv9Pwz4WEMZt9QSCiQkP2cIKsSrvpR5/6a8JA7fXndf6cEVJOgS1r+ewx9f3KJhuqbwJsA==
When I parse this using an ASN.1 parser it contains
- A RSA key (oid 1.2.840.113549.1.1.1),
- A MD5 hash (oid 1.2.840.113549.1.1.4)
- A 2048 bit string which is the signature.
Further investigation reveals this is likely called the Signed Public Key and Challenge (SPKAC) format and this format is accepted by the Microsoft CA server.
Question
- The keygen docs at Mozilla, and the keygen docs at w3 don't specify a return format after the POST. What should I return?
- After keygen is run, (see links at the bottom of this page) I don't see a certificate in my local store. Where is it?
- My understanding is that Keygen is used to create a Browser Certificate. What logical steps do I need to complete in order to finish this process?