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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    524
    Likes Received:
    14
    Trophy Points:
    18
    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 ~]#
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,494
    Likes Received:
    1,612
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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!
     
Loading...

Share This Page