[Asterisk-code-review] res_crypto: Use EVP API's instead of legacy API's (asterisk[master])
Philip Prindeville
asteriskteam at digium.com
Sat May 14 00:05:42 CDT 2022
Philip Prindeville has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/18560 )
Change subject: res_crypto: Use EVP API's instead of legacy API's
......................................................................
res_crypto: Use EVP API's instead of legacy API's
Change-Id: I78d5bc1becb4cbdcad670d10dc164af25f502c39
---
M tests/test_crypto.c
1 file changed, 23 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/60/18560/1
diff --git a/tests/test_crypto.c b/tests/test_crypto.c
index f7858f5..ddb15b4 100644
--- a/tests/test_crypto.c
+++ b/tests/test_crypto.c
@@ -256,6 +256,9 @@
FILE *fsig = NULL;
char signpath[64] = "/tmp/signingXXXXXX";
const char success[] = "Signature Verified Successfully\n";
+#if 1
+ FILE *fos;
+#endif
switch (cmd) {
case TEST_INIT:
@@ -307,6 +310,20 @@
fclose(fsig);
fsig = NULL;
+#if 1
+ ast_test_status_update(test, "openssl: %s\n", OPENSSL_VERSION_TEXT);
+ fos = fopen("/etc/os-release", "r");
+ if (fos != NULL) {
+ char buf2[4096];
+ unsigned i;
+ ast_test_status_update(test, "os:\n");
+ while ((i = fread(buf2, sizeof(char), sizeof(buf2), fos)) > 0) {
+ ast_test_status_update(test, "%.*s", (int)i, buf2);
+ }
+ fclose(fos);
+ }
+#endif
+
args[PUBLIC] = pub;
args[SIGNATURE] = signpath;
if (ast_test_capture_command(&cap, path, args, (const char *)digest, digestlen) != 1) {
@@ -314,6 +331,12 @@
goto cleanup;
}
+#if 1
+ ast_test_status_update(test, "pid: %d exitcode: %d\n", cap.pid, cap.exitcode);
+ ast_test_status_update(test, "out: '%.*s' (%zu)\n", (int) cap.outlen, cap.outbuf, cap.outlen);
+ ast_test_status_update(test, "err: '%.*s' (%zu)\n", (int) cap.errlen, cap.errbuf, cap.errlen);
+#endif
+
if (cap.outlen != sizeof(success) - 1 || memcmp(cap.outbuf, success, cap.outlen)) {
ast_test_status_update(test, "Unexpected value/length for stdout: '%.*s' (%zu)\n", (int) cap.outlen, cap.outbuf, cap.outlen);
goto cleanup;
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18560
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I78d5bc1becb4cbdcad670d10dc164af25f502c39
Gerrit-Change-Number: 18560
Gerrit-PatchSet: 1
Gerrit-Owner: Philip Prindeville <philipp at redfish-solutions.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220514/127d08cb/attachment.html>
More information about the asterisk-code-review
mailing list