The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cPanel XMLAPI - installssl

Discussion in 'cPanel Developers' started by dpbuk, May 29, 2009.

  1. dpbuk

    dpbuk Member

    Joined:
    Jul 7, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I have spent the last two days getting a module together using the cpanel api solution for customers to be able to install their own SSL certificates. This was going well untill I got to the part of installing the certificate.

    The issue is that the api module does not use a POST option and only GET and my string is greater than 2048 chars which means that it will not function.

    If I place the generated URL into the address bar it runs the function without issue, I just cannot get it to send the data to the server.

    Has anyone done this yet or can someone shed some light on this small issue?

    Thanks in advance!
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Let me try to understand this better: if you enter the raw URL in your browser it works, but if your script sends that same URL to the server, it doesn't work?
     
  3. dpbuk

    dpbuk Member

    Joined:
    Jul 7, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    yes this is correct. There is a limit on the get option of 2048 characters - when I build my url it is just over 2400 which means that it will not send!

    For example if I takeout the key variable it reduces it down to below the 2048 max and I get an error message from whm stating that it needs the key and certificate!
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Since you say this works in a web browser but not your programming environment, could this be a limitation of whatever you are using to interface with the API?
     
  5. dpbuk

    dpbuk Member

    Joined:
    Jul 7, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    If you are using the GET method, you are limited to a maximum of 2,048 characters, minus the number of characters in the actual path.

    When adding the certificate information and the key for SSL's together it goes past this number of characters.

    Does that make sense?
     
  6. dpbuk

    dpbuk Member

    Joined:
    Jul 7, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Did you understand the comment I made about the limitation with the get method on forms?
     
Loading...

Share This Page