<p>Philip Prindeville has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18560">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_crypto: Use EVP API's instead of legacy API's<br><br>Change-Id: I78d5bc1becb4cbdcad670d10dc164af25f502c39<br>---<br>M tests/test_crypto.c<br>1 file changed, 23 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/60/18560/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/test_crypto.c b/tests/test_crypto.c</span><br><span>index f7858f5..ddb15b4 100644</span><br><span>--- a/tests/test_crypto.c</span><br><span>+++ b/tests/test_crypto.c</span><br><span>@@ -256,6 +256,9 @@</span><br><span> FILE *fsig = NULL;</span><br><span> char signpath[64] = "/tmp/signingXXXXXX";</span><br><span> const char success[] = "Signature Verified Successfully\n";</span><br><span style="color: hsl(120, 100%, 40%);">+#if 1</span><br><span style="color: hsl(120, 100%, 40%);">+ FILE *fos;</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span> </span><br><span> switch (cmd) {</span><br><span> case TEST_INIT:</span><br><span>@@ -307,6 +310,20 @@</span><br><span> fclose(fsig);</span><br><span> fsig = NULL;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#if 1</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_status_update(test, "openssl: %s\n", OPENSSL_VERSION_TEXT);</span><br><span style="color: hsl(120, 100%, 40%);">+ fos = fopen("/etc/os-release", "r");</span><br><span style="color: hsl(120, 100%, 40%);">+ if (fos != NULL) {</span><br><span style="color: hsl(120, 100%, 40%);">+ char buf2[4096];</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned i;</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_status_update(test, "os:\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ while ((i = fread(buf2, sizeof(char), sizeof(buf2), fos)) > 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_status_update(test, "%.*s", (int)i, buf2);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ fclose(fos);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> args[PUBLIC] = pub;</span><br><span> args[SIGNATURE] = signpath;</span><br><span> if (ast_test_capture_command(&cap, path, args, (const char *)digest, digestlen) != 1) {</span><br><span>@@ -314,6 +331,12 @@</span><br><span> goto cleanup;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#if 1</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_status_update(test, "pid: %d exitcode: %d\n", cap.pid, cap.exitcode);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_status_update(test, "out: '%.*s' (%zu)\n", (int) cap.outlen, cap.outbuf, cap.outlen);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_status_update(test, "err: '%.*s' (%zu)\n", (int) cap.errlen, cap.errbuf, cap.errlen);</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (cap.outlen != sizeof(success) - 1 || memcmp(cap.outbuf, success, cap.outlen)) {</span><br><span> ast_test_status_update(test, "Unexpected value/length for stdout: '%.*s' (%zu)\n", (int) cap.outlen, cap.outbuf, cap.outlen);</span><br><span> goto cleanup;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18560">change 18560</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/18560"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I78d5bc1becb4cbdcad670d10dc164af25f502c39 </div>
<div style="display:none"> Gerrit-Change-Number: 18560 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Philip Prindeville <philipp@redfish-solutions.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>