openssl_csr_sign() (openssl extension)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Douglass

    #1

    openssl_csr_sign() (openssl extension)

    I'm running php 5.03 and attempting to use the openssl_csr_sig n() function

    Everything works great except for the configargs optional array

    Prototype is:

    openssl_csr_sig n ( mixed csr, mixed cacert, mixed priv_key, int days [,
    array configargs [, int serial]] )

    function call is:
    <?
    putenv("OPENSSL _CONF=/services/www/content/xlr8ed.ns.gatec h.edu/html/insecure/kalamos/openssl.conf");

    $config = array("x509_ext ensions" => "auth_only" );

    $userscert = openssl_csr_sig n($csr, $cacert, $privkey, 365, $config,11);
    ?>
    where openssl.conf has an [auth_only] section of:

    [auth_only]
    # These extensions are added when 'ca' signs a request.

    basicConstraint s = CA:FALSE
    nsCertType = client
    keyUsage = digitalSignatur e
    nsComment = "Authentica tion Only Certificate"
    extendedKeyUsag e = clientAuth

    A certificate is signed, but without the specified extensions.

    Does anyone have any experience with using this function? or this extension?
Working...