~myers-1/pyopenssl/npn

« back to all changes in this revision

Viewing changes to OpenSSL/ssl/connection.c

  • Committer: Myers Carpenter
  • Date: 2012-02-10 13:44:03 UTC
  • Revision ID: myers@maski.org-20120210134403-23n8adodgz9yha4s
add ifdefs so this will build with older versions of openssl

Show diffs side-by-side

added added

removed removed

Lines of Context:
327
327
    }
328
328
}
329
329
 
 
330
#if OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
330
331
static char ssl_Connection_get_next_proto_negotiated_doc[] = "\n\
331
332
Get protocol that the client selected\n\
332
333
\n\
348
349
    }    
349
350
    return PyBytes_FromStringAndSize((const char *)data, (Py_ssize_t)len);
350
351
}
 
352
#endif
351
353
 
352
354
static char ssl_Connection_set_tlsext_host_name_doc[] = "\n\
353
355
Set the value of the servername extension to send in the client hello.\n\
1292
1294
    ADD_METHOD(get_context),
1293
1295
    ADD_METHOD(set_context),
1294
1296
    ADD_METHOD(get_servername),
 
1297
#if OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
1295
1298
    ADD_METHOD(get_next_proto_negotiated),
 
1299
#endif
1296
1300
    ADD_METHOD(set_tlsext_host_name),
1297
1301
    ADD_METHOD(pending),
1298
1302
    ADD_METHOD(send),