Changeset 4ec9183 in mod_gnutls for src/gnutls_hooks.c


Ignore:
Timestamp:
Feb 13, 2014, 3:40:44 PM (6 years ago)
Author:
Daniel Kahn Gillmor <dkg@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
2de1320
Parents:
1830668
git-author:
Benny Baumann <BenBE@…> (02/12/14 16:03:14)
git-committer:
Daniel Kahn Gillmor <dkg@…> (02/13/14 15:40:44)
Message:

Include GnuTLS version as additional version component in Server string

It would be nice if mod_gnutls could add the used (runtime) version of
GnuTLS as an additional version component.

The below patch will add this information while falling back to using
the static version string (plus an indication) if the dynamic version
could not be constructed.

Regards,
BenBE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_hooks.c

    r1830668 r4ec9183  
    452452
    453453    ap_add_version_component(p, "mod_gnutls/" MOD_GNUTLS_VERSION);
     454
     455    {
     456        char* gnutls_version = apr_psprintf(p, "GnuTLS/%s", gnutls_check_version(NULL));
     457        if( !gnutls_version ) {
     458            // In case we could not create the above string go for the static version instead
     459            ap_add_version_component(p, "GnuTLS/" GNUTLS_VERSION "-static");
     460        } else {
     461            ap_add_version_component(p, gnutls_version);
     462        }
     463    }
    454464
    455465    return OK;
Note: See TracChangeset for help on using the changeset viewer.