2

I am try to determine if Client Certificate URLs from RFC 4366 is supported by OpenSSL library. I can not find any information in the OpenSSL documentation.

In file tls.h I can see following defines:

/* ExtensionType values from RFC3546 / RFC4366 / RFC6066 */
# define TLSEXT_TYPE_server_name                 0
# define TLSEXT_TYPE_max_fragment_length         1
# define TLSEXT_TYPE_client_certificate_url      2
# define TLSEXT_TYPE_trusted_ca_keys             3
# define TLSEXT_TYPE_truncated_hmac              4
# define TLSEXT_TYPE_status_request              5

There is also a method to use client extension:

int SSL_CTX_add_client_custom_ext(SSL_CTX *ctx, unsigned int ext_type,
                                  custom_ext_add_cb add_cb,
                                  custom_ext_free_cb free_cb,
                                  void *add_arg,
                                  custom_ext_parse_cb parse_cb,
                                  void *parse_arg);

I've looked in to the OpenSSL sources and the TLSEXT_TYPE_client_certificate_url is used only in file s_cb.c in as callback support:

void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
                     unsigned char *data, int len,
                     void *arg)
{
    BIO *bio = arg;
    char *extname;

    switch(type)
    {
    case TLSEXT_TYPE_server_name:
    extname = "server name";
    break;

    case TLSEXT_TYPE_client_certificate_url:
    extname = "client certificate URL";
    break;

    (...)

    default:
    extname = "unknown";
    break;

    }

    BIO_printf(bio, "TLS %s extension \"%s\" (id=%d), len=%d\n",
         client_server ? "server": "client",
         extname, type, len);
    BIO_dump(bio, (char *)data, len);
    (void)BIO_flush(bio);
}

When I search for TLSEXT_TYPE_server_name I can see there is an usage of this flag Example in file t1_lib.c

unsigned char ssl_add_serverhello_tlsext(SSL s, unsigned char *buf,
                                          unsigned char *limit)
{
    int extdatalen = 0;
    unsigned char *orig = buf;
    unsigned char *ret = buf;
# ifndef OPENSSL_NO_NEXTPROTONEG
    int next_proto_neg_seen;
# endif

    /*
     * don't add extensions for SSLv3, unless doing secure renegotiation
     */
    if (s->version == SSL3_VERSION && !s->s3->send_connection_binding)
        return orig;

    ret += 2;
    if (ret >= limit)
        return NULL;            / this really never occurs, but ... /

    if (!s->hit && s->servername_done == 1
        && s->session->tlsext_hostname != NULL) {
        if ((long)(limit - ret - 4) < 0)
            return NULL;

        s2n(TLSEXT_TYPE_server_name, ret);
        s2n(0, ret);

It brings me to the point that TLSEXT_TYPE_server_name extension is supported but there is no clear information about TLSEXT_TYPE_client_certificate_url.

jww
  • 97,681
  • 90
  • 411
  • 885
padamowski
  • 139
  • 5

1 Answers1

1

No, this extension is not supported in any OpenSSL version.

Matt Caswell
  • 8,167
  • 25
  • 28