API Method -createPKCS12
Last updated
Last updated
Purpose
Use the “createPKCS12” method for creating the PFX certificate based on the profile selection.
POST
http://www.example.com/emCAServices/rest/createPKCS12
Header:
Content-Type : application/json
Request JSON Data:
{
"signature" :
"MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwGggCSABIGLQ049
dGh1bGFzaSxTRVJJQUxOVU1CRVI9QVZBUEc0MjAxQSxFPXRodWxhc2kuZ0BlbXVkaHJhLmNvbSxPPWVtd WRocmEsUz1LQSxDPUlOLFBvc3RhbENvZGU9NTYwMTAzLEtleUFsb2dpcnRobUFuZFNpemU9UlNBLTEwMj QsUGFzc3dvcmQ9MTIzNAAAAAAAAKCAMIIDpjCCAo6gAwIBAgIDTEtBMA0GCSqGSIb3DQEBCwUAMHQxJTA
jBgNVBAMMHENlcnRpZmljYXRlTWFuYWdlciBSb290IDIwMTYxGDAWBgNVBAoMD2VNdWRocmEgTGltaXRl ZDEQMA4GA1UECwwHZW11ZGhyYTESMBAGA1UECAwJQmFuZ2Fsb3JlMQswCQYDVQQGEwJJTjAeFw0xODA1M DMwNTUyNDNaFw0yMDA1MDIwNTUyNDNaMCgxFzAVBgNVBA8MDkF1dGhlbnRpY2F0aW9uMQ0wCwYDVQQDDA
RyYWNhMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm4k/r47G8+eRm/zftRSwxg8koTXLEHG JF5MKJZjUsPweASFbxxcj1RwixCHaAP75n3u0JCOFBuOVDMlPMu47j9w+x6jig3IMdVhPo6/rU7Z75Gtw FQDvhLZhoz2VMrSThfjvhaYEiOYy4uhC7sXOVedCw3rFylFtbljgwgnPC6Rp75TesIKj1l+9dZY08OxyI CNUNluztcMOXDqk68rtzbZfPvtfH4msDpyUoJL7XmBwbXF7UMiISlCiSvqpjYyBsu+tPxuOpgxlGbyJGm Wfi9D7Nzg4a8SBW6NrRWhtGASUj+/SaJpH0LI5wTrmMri8vJ2r2LHyi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JZ0JRu7WZgrfHkBZ7p1eIv6LR t/nja93Fuc2M8Jl8B00DeQDNkyjnIN3gVS+0Hr8/ZIfClYa3huxfm8h1PeQHupaZ53UZKONLe7rRVVJGI A2IZwRkXcxk/2Z47qw1hUFvtXokQBbqOj1rDhL3Dh6pOsU9XbXTKGXzmcs0I6RXSB3DHbwQtsPK7neEyJ BbxS0IpiKxY7IZtF2+m+WXmjWQyg7ZIYK0/X96XkYA7W7rcEPjAAAAAAAA",
" userName" : "username"
" password" : "password "
" profileName" : "Class2IndividualEncryption-Oneyear" " subscriberId " : "XXX"
"applicationId" : "XXX"
}
//parameter :- signature //
“CN=test~SERIALNUMBER=AVAPG4201A~E=test@emudhra.com~O=emudhra~S=KA~C=IN~PostalCod e=560103~KeyAlgorithmAndSize=RSA-2048~Password=1234”
Header:
Request Body:
Content-Type : application/json
emKey : 47b54594063957de22fce0aeddd51a6adf4a80aa
{
"requestData":"Q/5rvKIZvoMfuZQnysxcGawX4wC1xRttkCHEExreOwUCltgPG0FmsAbEmNHgHvdM2A 7Vadyks2IDACydZDRG9rS/uq93IO3KMAyazof7IJXz31c3LiXorwiRksUFOrH2IqYbqI1q88Sf3rnxoTd q8oaOzYB2LoNPh8dZihJyDIR33BccF1Dg/sS/UAwxJ3fjbPzRJpFcqhi2FX1IS8TxyW2PZtPyLtSddyDF xliryGv8RMmVem6NdJYeNHcYo82qHtszdepvIWCi/DLCqs1alR9TcOsKQ8skBTUQY5xfiuONm68zytXBl F+MIAB40Wsw/12zywoCe2z14wqA/mvzF6Jd/Cw3059NfW8FtmBS502ty4l+kSDallVUCSFP9b9Drsh4q/ giwT+zHa/SQ3LWCFkjDLaB/OMzMaZfAFwm27/mDB4mSWVMPzMo8CDBvNNNekeV6lSeKSJ7rEbR2JJYIeL zQFp++Dvnp0KZHZu5r+muXAPFCnsDj3MbLrpvbdl3VYKjtDCu0MXi/LX787pStPvr9coMmHTCwja5p7Rw I7Ji/nbOnVpT8f2ylx/Rq7vTFRGAqnFmEK5HAkN6Owdf/dKaKUtifXzJqgjYft0NS7uoXbEJWbb4I86Aq LhsPbqqN2zlOXZIaYLvkoleo//gAcevv6ZS3jk5rkhueR44ablyv5nhgQ25Fhg5cqu4hxUBOi1MRXk5Rp A6RZkaz+DPGSsJJ4+yKzTEnxhUZvnqzeFEf1cvIU3Fx9PLmvrQ50cE28AdNu749WOUyjq/eZCFC1rmY6K yThU4ng49S+iqCrUiIIF+McgjbuVPRvy0M9eYi9HpVOduV7XEI2zrRLpID0ueVwo/j6XePsofLvk/5J/x T9S8Ge6wgVNQzkO47eLi2VEPf5OXRopBaSLFZ1SPIgBVumlSnPgLfdNVOirJjhqMyADZrXgoAw3c+YTqR hsRDAhtPKx90Qtw643eLEi/1ujz9ZxB6yzTvFYnh05eaM+N08QVlEJcS+z84vqnY6/+8746T6Ct/tDrLd FCNVvveSEPVCujbE6LI6pzAnNuHWZoFYoDjANRTDuS8m3LY3mcC24cTJnNTt7a/hF6IsUj0ygfVctkpAT XvW9p1m4p6BpYmXFSP6w0nMvKnHd+Uy2R3qykk/1R6YoZbaG9dM3LrAqqAILkYNucL32xZCbSSKX6HIQt Z0WMAfTubYXLsDnAZCLeph1P+fjnkbgrpizkQg==",
"userName":"username"
}
When request is received by emCA service, we will decrypt the request JSON Object with the same AES key that is shared with the client.
After successful decryption, request JSON object (Subject DN details, Key algorithm & Size, PFX password) + Username + Password + Profile Name + Subscriber ID + Application ID) is retrieved.
First the emCA service will validate username and password and check the IP Address used to make the request is registered with the same user
If request is registered with the same user, then we check if the certificate is already created for requested applicationId or not.
If certificate is already created for applicationId then return existing certificat
If certificate is not created for applicationId then we create certificate using the next step.
If it is same then (signature data) is validated by checking whether user info i.e. (Subject DN details, key algorithm & size, pfx password) is signed by same pfx which is registered for the specific user.
If validation fails at any point in processing the request, the emCA service will throw error/failure message.
JSON Object Contains below parameters
Response JSON Format
Sample:
Success:
Response Body(Is Manual Authorization Enabled is “not“ checked from emCA)
{
"status":"success",
"result":" base 64 encoded PFX data"
“subscriberId”:”XXX” "requestId": null
}
Response Body (Is Manual Authorization Enabled is checked from emCA )
{
"status": "Success",
"result": " your request proceded sucssusfully", "subscriberId": "XXXX",
"requestId": “XXXX”
}
Failure:
{
"status":"failure", "result":"<Error message>" “subscriberId”:null "requestId": null
}
"sk8Om7vr+LwRo0ZbR0HLMpCY3pH41C+grv5c0VMeN9xuBDA+tvCMwd2XgLwoWh4xcd1UGyDy0K85V81Dx jmzDoyHmb4izAU1AI+CTiWzZUtl0CPvcSp/YLhNBkBkZhyWb1lMYq5Vh2Ny91hciTulxQ95BKdvD1mMV1P s+pmBhbp9Frk5lfzfGR+e3uQtJMO8TDZ9G+7LR1Mx2nQTTO/eX3Ydiu01v2YPMmtTENC5AosQYDdOnxTI8 srtQklVSxjhUHl9/9U/GtO3iZOvnEXkXBJ4rnY6yb+rBVfsKAViS1POLfe8R9Hei25WixYZh3gZIdbCG8a uwGuyRpa4Nx8Cne+a0yNITDJ/BqFovLsQtfZbe6+PCrzyUmDC2rWd3h4Ut140JHj85nHzhm1Pbl1xuTgHN ks6d9PnVVrXDRvp3kQkrDtum4ovWgjLjhHTmSvquYNhZqMo8ULO4FLb8qbRWxzM3JkHc0+51nusckvaoHI P0nPHG5CIayu697V6I74diiNTq9qT76RwGRDGJPmN9x9QQWhmBv2AiecOxJ4T+BOVdKnzmntuXgxmyl+m3
+eHlc5HUCJS/D1ZW1Sgw47WiG3gLpl2SbR5Wj4iGzimG2nPVKlyunTVuX8jrs15Z3voV4PXoSIcckC9jbv
lGTdMsNL4zTKNbj0Ly3feQDmvuaudC7VGd5AERKag68gjb7+telkSU/YnNoexwcAlrVLydAfazN1GmbiyC XTpvxYXrvOLGPuzSObWz3+ozM5H8deIKDrp+JW4wvLMLarvqH0pspg0DsoGvn+poDVPT4ixzLDomLNQp7I ZzdH8q078noovJSGWIs2U4YXefx4aTPFwmKZZbyZNQb5oDJz5D38oV6T27oAr6cM/8cRgiTLelJeoboi5T 5n+7w8g1mPyo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