add error function and print out

This commit is contained in:
JacobBarthelmeh
2020-06-12 09:45:23 -07:00
parent d97c23edd8
commit 2b5ed1564c
3 changed files with 71 additions and 45 deletions

View File

@@ -149,6 +149,7 @@ class wolfSSL_Example_IOCallbacks
}
Console.WriteLine("Status of certificate verify = " + preverify);
Console.WriteLine("Error value for cert store is " + wolfssl.X509_STORE_CTX_get_error(store));
/* look at the current cert in store */
try
@@ -171,7 +172,7 @@ class wolfSSL_Example_IOCallbacks
}
catch (Exception e)
{
Console.WriteLine("Unable to get X509's");
Console.WriteLine("Unable to get X509's" + e);
}
/* list all certs in store */
@@ -190,11 +191,11 @@ class wolfSSL_Example_IOCallbacks
}
catch (Exception e)
{
Console.WriteLine("Unable to get X509's");
Console.WriteLine("Unable to get X509's" + e);
}
/* by returning 1 here we override any failure and report success */
return 1;
return preverify;
}
private static void clean(IntPtr ssl, IntPtr ctx)