diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-08-13 14:48:55 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-08-13 14:48:55 +0200 |
commit | 0fc554cf8dba9864306f4ee323b1ccd21560d089 (patch) | |
tree | d97f900bd28ae88cd50da59c0b27967388ec000e /lib/gnutlsxx.cpp | |
parent | 5524c9a9c0beafe24a2ca310dc54afb1fec37d2c (diff) | |
download | gnutls-0fc554cf8dba9864306f4ee323b1ccd21560d089.tar.gz |
Don't call SRP functions if SRP is disabled.
Diffstat (limited to 'lib/gnutlsxx.cpp')
-rw-r--r-- | lib/gnutlsxx.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gnutlsxx.cpp b/lib/gnutlsxx.cpp index 9d38f2349e..e3745a312c 100644 --- a/lib/gnutlsxx.cpp +++ b/lib/gnutlsxx.cpp @@ -396,10 +396,12 @@ void session::set_credentials( credentials &cred) RETWRAP(gnutls_credentials_set( s, cred.get_type(), cred.ptr())); } +#ifdef ENABLE_SRP const char* server_session::get_srp_username() const { return gnutls_srp_server_get_username( s); } +#endif const char* server_session::get_psk_username() const { @@ -678,6 +680,8 @@ void certificate_client_credentials::set_retrieve_function( gnutls_certificate_c // SRP +#ifdef ENABLE_SRP + srp_server_credentials::srp_server_credentials() : credentials(GNUTLS_CRD_SRP) { RETWRAP(gnutls_srp_allocate_server_credentials( &cred)); @@ -722,6 +726,8 @@ void srp_client_credentials::set_credentials_function(gnutls_srp_client_credenti gnutls_srp_set_client_credentials_function( cred, func); } +#endif /* ENABLE_SRP */ + // PSK psk_server_credentials::psk_server_credentials() : credentials(GNUTLS_CRD_PSK) |