Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to Public Key Pinning

Discussion in 'General Discussion' started by Nirjonadda, Jan 24, 2018.

  1. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    612
    Likes Received:
    15
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    Please let me know that it's possible to generate the PINs by accessing the server with PuTTY via SSH and the run?

    Code:
    [root@na ~]# openssl rsa -in my-key-file.key -outform der -pubout | openssl dgst -sha256 -binary | openssl enc -base64
    Error opening Private Key my-key-file.key
    140399466469280:error:02001002:system library:fopen:No such file or directory:bss_file.c:402:fopen('my-key-file.key','r')
    140399466469280:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:404:
    unable to load Private Key
    47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
    [root@na ~]# openssl dgst -sha256 -binary public.key | openssl enc -base64
    public.key: No such file or directory
    [root@na ~]#
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,937
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    We don't support public key pinning natively in cPanel & WHM at this time, however I encourage you to vote and add feedback to the following feature request:

    Enhance SSL security: Public Key Pinning (HPKP)

    In the meantime, the following third-party URL offers information on how to implement this manually:

    HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd - Raymii.org

    Regarding the modifications to the Virtual Hosts in Apache for the domain name, this document offers instructions on how to add custom entries:

    Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation

    Note that mod_headers is compiled with Apache by default:

    Code:
    # httpd -M|grep header
    headers_module (shared)
    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice