tls: update psk xlat call
authorSam Hartman <hartmans@painless-security.com>
Thu, 27 Jun 2013 13:42:22 +0000 (09:42 -0400)
committerSam Hartman <hartmans@debian.org>
Tue, 13 Aug 2013 18:52:39 +0000 (14:52 -0400)
Ilclude talloc context in xlat and setup of psk-user-identity in request.

src/main/tls.c

index 93d4c6d..2937574 100644 (file)
@@ -99,15 +99,15 @@ static unsigned int psk_server_callback(SSL *ssl, const char *identity,
                 size_t hex_len = 0;
                if (max_psk_len > PSK_MAX_PSK_LEN)
                  max_psk_len = PSK_MAX_PSK_LEN;
-               vp = radius_pairmake(request, &request->config_items,
+               vp = pairmake(request, &request->config_items,
                                  "tls-psk-identity",
                                  identity, T_OP_SET);
                if (vp) {
                        if (identity_is_safe(identity))
                          hex_len = radius_xlat((char *) psk_buffer,
                                                2*max_psk_len+1,
-                                               "%{psksql:select hex(key) from psk_keys where keyid = '%{control:tls-psk-identity}';}",
-                                               request, NULL, NULL);
+                                               request, "%{psksql:select hex(key) from psk_keys where keyid = '%{control:tls-psk-identity}';}",
+                                               NULL, NULL);
                        if (hex_len >0)
                          return fr_hex2bin(psk_buffer, psk, hex_len);
                }