DevOps Automation

DevOps Automation

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#DevOps
 View Only
  • 1.  Unable to Record a session with certificate

    Posted Tue August 22, 2023 12:58 PM
      |   view attached

    I have an application that requires certificate and unable to proceed further in developing a test script due to error " The certificate database file or pass phrase is invalid: Invalid file contents or pass phrase".

    I received PEM file types from the team - converted it to "p12" - it's working fine with POSTMAN (response received as expected). I have imported the same "p12" file, installed at "your certificates" location in Firefox.

    In RPT, While recording - Selected Client certificate and browsed to the Certificate Location path , provided password of the certificate. I got the above mentioned error as soon as I started entering password.

    I also tried, Click on Multiple certificate --> Add --> Provided Hostname, Port , Certificate database path and the password (Same error as soon as I started entering password)

    Should I input Password different from Certificate ?

    Any help is appreciated ? 

    (attached screenshot of error)

    Thanks,

    Sudheesh Srikantam



    ------------------------------
    sudheesh srikantam
    ------------------------------


  • 2.  RE: Unable to Record a session with certificate

    Posted Wed August 23, 2023 05:49 AM

    The password in the Proxy Recorder Settings should be the same as the one you used when installing the certificate in Firefox.

    I recommend deleting the existing certificate file then re-importing it:

    1) In RPT, delete the existing rdi_api_qa_2023.p12 certificate file in the RDI_API project.

    2) Use File->Import->General->File System to import the  rdi_api_qa_2023.p12 certificate file back into the RDI_API project.

    3) Try the recording again.  When you are supplying the password, you will see the "pass phrase is invalid" message as you enter the password but it should go away once the full password is entered.

    If you are running RPT on Windows, you can verify the certificate's password by double-clicking on the rdi_api_qa_2023.p12 file in File Explorer to bring up the Certificate Import Wizard and then go through the Wizard and enter your password.

    It is possible that older versions of RPT might not work with current certificates.  The current shipping version of RPT is 10.5.3.



    ------------------------------
    Scott Didier
    ------------------------------



  • 3.  RE: Unable to Record a session with certificate

    Posted Wed August 23, 2023 09:31 AM

    I  believe RPT does not support adding .cer and .key files directly, it support PKCS12 format only. These files must be converted to .pfx firstly and then add to a "keystore/database" folder (folder within RPT project).  Following are the steps to convert a .cer to .pfx and add it in keystore/database:

    For conversion you need tools like "Openssl" to perform this action. The command to convert is:
    openssl pkcs12 -inkey server_key.key -in server_cert.cert -export -out server_pfx.pfx


    Where....



    ------------------------------
    Rajesh Avanthi
    ------------------------------



  • 4.  RE: Unable to Record a session with certificate

    Posted Wed August 23, 2023 09:40 AM

    Hello Scott,

    I did deleting & importing the certificates several times. Password I used while importing on Firefox is not working in RPT. I understood from your message, Older versions before 10.5.3 might have this issue - I'm using 10.0.2. Do you think this version has issue with certificate ?

    Thanks,

    Sudheesh S



    ------------------------------
    sudheesh srikantam
    ------------------------------



  • 5.  RE: Unable to Record a session with certificate

    Posted Wed August 23, 2023 12:05 PM

    RPT 10.0.2 (from December 2019) should be recent enough.

    You can use the command "certutil -dump rdi_api_qa_2023.p12" to check on your certificate.  After entering this command, you will need to provide the certificate's password.



    ------------------------------
    Scott Didier
    ------------------------------



  • 6.  RE: Unable to Record a session with certificate

    Posted Wed August 23, 2023 12:33 PM

    Hello Scott,

    Thanks for your continuous support ! I tried the command you suggested. I used the same Password that I'm trying to use in RPT - I got the details like serial number, Issuer , cert Hash and others with a "Encryption Test Passed" message.

    Thanks,

    Sudheesh S



    ------------------------------
    sudheesh srikantam
    ------------------------------



  • 7.  RE: Unable to Record a session with certificate

    Posted Wed August 23, 2023 09:44 AM

    Hello Rajesh,

    Thanks for your reply ! I used "CER" files only in POSTMAN to make sure that certificates are working. However, I converted it to "p12" format before importing in RPT. As per your suggestion, I'll try to change the extension to "pfx" (though p12 and pfx are same) - Hopefully, It works. 

    Regards,

    Sudheesh S



    ------------------------------
    sudheesh srikantam
    ------------------------------



  • 8.  RE: Unable to Record a session with certificate

    Posted Mon August 28, 2023 03:16 PM

    If you are still having a problem with the certificate and can share the certificate and its password with RPT support, I recommend creating a support ticket for this issue.  The Support team would then be able to take a closer look at your certificate to determine why it isn't accepted.



    ------------------------------
    Scott Didier
    ------------------------------