Hi Support Team,
We are using opensssl to generate the private key and CSR, while requesting the security token and secret id using this CSR always getting error 400.
Below is the part of onboarding script but in the same time if I use the CSR generated using Fatoora SDK, getting successful response.
Kindly check the below and recommend the necessary changes.
#Generate private key
openssl ecparam -name secp256k1 -genkey -noout -out privatekey.pem
Write-Host “Private key generated.”
#Generate public key
openssl ec -in privatekey.pem -pubout -conv_form compressed -out publickey.pem
Write-Host “Public key generated.”
#Generate CSR(Certificate signing request)
openssl base64 -d -in publickey.pem -out publickey.bin
openssl req -new -sha256 -key privatekey.pem -extensions v3_req -config $csrconfig -out .\taxpayer.csr
openssl base64 -in taxpayer.csr -out taxpayerCSRbase64Encoded.txt
$CSRbase64Encoded = Get-Content -path taxpayerCSRbase64Encoded.txt -Raw
$CSRbase64Encoded = $CSRbase64Encoded -replace “n","" $CSRbase64Encoded = $CSRbase64Encoded -replace "r”,“”