Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| vendors:cisco:uc:ucce:cvp [2024/09/13 14:23] – [Securing CVP] gerardorourke | vendors:cisco:uc:ucce:cvp [2025/10/17 17:00] (current) – gerardorourke | ||
|---|---|---|---|
| Line 35: | Line 35: | ||
| *[[vendors: | *[[vendors: | ||
| *[[https:// | *[[https:// | ||
| + | *[[vendors: | ||
| + | |||
| ==== CVP FTP ==== | ==== CVP FTP ==== | ||
| Line 85: | Line 87: | ||
| [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\VXMLServer\Parameters\Java\Options] | [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\VXMLServer\Parameters\Java\Options] | ||
| - | ==== Local value Examples==== | + | ===== Set Value - Local Variables ===== |
| - | Use Local vars (Set value) | + | Create |
| + | |||
| + | ==== SHA 256 Example ==== | ||
| + | < | ||
| + | // CVP Rhino: SHA-256 via Java MessageDigest | ||
| + | function sha256_sql(accountNum) { | ||
| + | if (!accountNum) return null; | ||
| + | |||
| + | // Convert JS string to UTF-8 bytes | ||
| + | var javaStr = new java.lang.String(accountNum); | ||
| + | var bytes = javaStr.getBytes(" | ||
| + | |||
| + | // Create SHA-256 digest | ||
| + | var md = java.security.MessageDigest.getInstance(" | ||
| + | md.update(bytes); | ||
| + | var digest = md.digest(); | ||
| + | |||
| + | // Convert byte array to hex string | ||
| + | var hex = ''; | ||
| + | for (var i = 0; i < digest.length; | ||
| + | var h = (digest[i] & 0xFF).toString(16); | ||
| + | if (h.length === 1) h = ' | ||
| + | hex += h; | ||
| + | } | ||
| + | |||
| + | return hex.toUpperCase(); | ||
| + | } | ||
| + | |||
| + | // Example usage | ||
| + | var accountNum = " | ||
| + | var hash = sha256_sql(accountNum); | ||
| + | |||
| + | // Expected output: 9BBEF19476623CA56C17DA75FD57734DBF82530686043A6E491C6D71BEFE8F6E | ||
| + | </ | ||
| + | |||
| + | * Uses Java’s MessageDigest, | ||
| + | * Converts | ||
| + | * Outputs a hex string in uppercase, exactly like SQL Server’s CONVERT(VARCHAR(64), | ||
| + | |||
| + | CVP’s | ||
| + | So in the above code, it is calling the Java MessageDigest.getInstance method to get a SHA-256 digest object. | ||
| + | |||
| + | |||
| + | You can instantiate objects, call methods, and access constants just like in Java. | ||
| ===Retrieving the Length of a Session Variable in Call Studio=== | ===Retrieving the Length of a Session Variable in Call Studio=== | ||
| Line 138: | Line 183: | ||
| var mybanana = ' | var mybanana = ' | ||
| eval(" | eval(" | ||
| + | </ | ||
| + | |||
| + | <alert type=" | ||
| + | So do no use eval if you want to return an integer. Convert to a string and just have the string as the last line as in the below example. | ||
| + | < | ||
| + | var pollDurationInt; | ||
| + | pollDurationInt = {Data.Session.pollDuration}; | ||
| + | pollDurationInt = parseInt(pollDurationInt, | ||
| + | pollDurationInt = pollDurationInt .toString(); | ||
| + | pollDurationInt; | ||
| </ | </ | ||
| ====user.microapp.error_code==== | ====user.microapp.error_code==== | ||
| Line 277: | Line 332: | ||
| | | ||
| + | |||
| + | ==== Quays - QID 38863 - Weak SSL/TLS Key Exchange==== | ||
| + | |||
| + | Add to the Java Options key located at: | ||
| + | Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\OPSConsoleServer\Parameters\Java\ | ||
| + | |||
| + | Note above is for CVP Ops console tomcat - but you can also set it for wsm, callserver, vxmlserver tomcat installs etc. | ||
| + | < | ||
| + | -Djdk.security.defaultKeySize=DiffieHellman: | ||
| + | -Djdk.tls.ephemeralDHKeySize=2048 | ||
| + | </ | ||