<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[wolfSSL - Embedded SSL Library — mp_exptmod error state]]></title>
		<link>https://www.wolfssl.com/forums/topic696-mpexptmod-error-state.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic696.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in mp_exptmod error state.]]></description>
		<lastBuildDate>Thu, 13 Aug 2015 14:20:44 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: mp_exptmod error state]]></title>
			<link>https://www.wolfssl.com/forums/post2135.html#p2135</link>
			<description><![CDATA[<p>Hi,</p><p>I have run the tests and this is the output that I get:</p><p>MD4&nbsp; &nbsp; &nbsp; test passed!<br />SHA&nbsp; &nbsp; &nbsp; test passed!<br />SHA-256&nbsp; test passed!<br />HMAC-MD5 test passed!<br />HMAC-SHA test passed!<br />HMAC-SHA256 test passed!<br />ARC4&nbsp; &nbsp; &nbsp;test passed!<br />HC-128&nbsp; &nbsp;test passed!<br />Rabbit&nbsp; &nbsp;test passed!<br />DES&nbsp; &nbsp; &nbsp; test passed!<br />DES3&nbsp; &nbsp; &nbsp;test passed!<br />AES&nbsp; &nbsp; &nbsp; test passed!<br />RANDOM&nbsp; &nbsp;test passed!<br />sf_fopen: &quot;./certs/client-key.der&quot; mode &quot;rb&quot;<br />wolfSSL Entering GetMyVersion<br />sf_fopen: &quot;./certs/client-cert.der&quot; mode &quot;rb&quot;<br />RSA&nbsp; &nbsp; &nbsp; test passed!<br />sf_fopen: &quot;./certs/dh2048.der&quot; mode &quot;rb&quot;<br />DH&nbsp; &nbsp; &nbsp; &nbsp;test passed!<br />sf_fopen: &quot;./certs/dsa2048.der&quot; mode &quot;rb&quot;<br />wolfSSL Entering GetMyVersion<br />DSA&nbsp; &nbsp; &nbsp; test passed!<br />PWDBASED test passed!<br />Test finished with result code 0</p><p>The function wolfcrypt_test() uses about 4kB of stack on this system which initially caused the DH tests to throw an exception until I increased the allocation. It takes a significant time to execute the RSA, DH, DSA and PWDBASED tests. I presume that this is normal for a 100MHz microcontroller? I think that this proves that the underlying crypto is working on this platform.</p><p>If I try the connection without the SSL_VERIFY_NONE option I get this:</p><p>Connecting to host: smtp.gmail.com<br />Resolved host address: 64.233.166.108<br />wolfSSL Entering SSL_library_init<br />wolfSSL Entering wolfSSL_Init<br />wolfSSL Entering WOLFSSL_CTX_new<br />wolfSSL Entering wolfSSL_CertManagerNew<br />wolfSSL Leaving WOLFSSL_CTX_new, return 0<br />RXS:<br />220 smtp.gmail.com ESMTP uo6sm3611775wjc.1 - gsmtp<br />RXE.<br />TXS:<br />EHLO PRIME<br />TXE.<br />RXS:<br />250-smtp.gmail.com at your service, [83.105.130.164]<br />250-SIZE 35882577<br />250-8BITMIME<br />250-STARTTLS<br />250-ENHANCEDSTATUSCODES<br />250-PIPELINING<br />250-CHUNKING<br />250 SMTPUTF8<br />RXE.<br />TXS:<br />STARTTLS<br />TXE.<br />RXS:<br />220 2.0.0 Ready to start TLS<br />RXE.<br />wolfSSL Entering SSL_new<br />wolfSSL Leaving SSL_new, return 0<br />wolfSSL Entering SSL_set_fd<br />wolfSSL Leaving SSL_set_fd, return 1<br />wolfSSL Entering SSL_connect()<br />growing output buffer</p><p>Shrinking output buffer</p><p>connect state: CLIENT_HELLO_SENT<br />growing input buffer</p><p>received record layer msg<br />wolfSSL Entering DoHandShakeMsg()<br />wolfSSL Entering DoHandShakeMsgType<br />processing server hello<br />wolfSSL Entering VerifyClientSuite<br />wolfSSL Leaving DoHandShakeMsgType(), return 0<br />wolfSSL Leaving DoHandShakeMsg(), return 0<br />growing input buffer</p><p>received record layer msg<br />wolfSSL Entering DoHandShakeMsg()<br />wolfSSL Entering DoHandShakeMsgType<br />processing certificate<br />Loading peer&#039;s cert chain<br />&nbsp; &nbsp; Put another cert into chain<br />&nbsp; &nbsp; Put another cert into chain<br />&nbsp; &nbsp; Put another cert into chain<br />wolfSSL Entering GetExplicitVersion<br />wolfSSL Entering GetMyVersion<br />Got Cert Header<br />wolfSSL Entering GetAlgoId<br />Got Algo ID<br />Getting Cert Name<br />Getting Cert Name<br />Got Subject Name<br />wolfSSL Entering GetAlgoId<br />Got Key<br />Parsed Past Key<br />wolfSSL Entering DecodeCertExtensions<br />wolfSSL Entering DecodeAuthKeyId<br />wolfSSL Entering DecodeSubjKeyId<br />wolfSSL Entering DecodeBasicCaConstraint<br />wolfSSL Entering DecodeKeyUsage<br />wolfSSL Entering DecodeCrlDist<br />Certificate Policy extension not supported yet.<br />wolfSSL Entering GetAlgoId<br />About to verify certificate signature<br />No CA signer to verify with<br />Failed to verify CA from chain<br />wolfSSL Entering GetExplicitVersion<br />wolfSSL Entering GetMyVersion<br />Got Cert Header<br />wolfSSL Entering GetAlgoId<br />Got Algo ID<br />Getting Cert Name<br />Getting Cert Name<br />Got Subject Name<br />wolfSSL Entering GetAlgoId<br />Got Key<br />Parsed Past Key<br />wolfSSL Entering DecodeCertExtensions<br />wolfSSL Entering DecodeAuthKeyId<br />wolfSSL Entering DecodeSubjKeyId<br />wolfSSL Entering DecodeBasicCaConstraint<br />wolfSSL Entering DecodeKeyUsage<br />wolfSSL Entering DecodeCrlDist<br />wolfSSL Entering DecodeAuthInfo<br />Certificate Policy extension not supported yet.<br />wolfSSL Entering GetAlgoId<br />About to verify certificate signature<br />No CA signer to verify with<br />Failed to verify CA from chain<br />Verifying Peer&#039;s cert<br />wolfSSL Entering GetExplicitVersion<br />wolfSSL Entering GetMyVersion<br />Got Cert Header<br />wolfSSL Entering GetAlgoId<br />Got Algo ID<br />Getting Cert Name<br />Getting Cert Name<br />Got Subject Name<br />wolfSSL Entering GetAlgoId<br />Got Key<br />Parsed Past Key<br />wolfSSL Entering DecodeCertExtensions<br />wolfSSL Entering DecodeExtKeyUsage<br />wolfSSL Entering DecodeAltNames<br />wolfSSL Entering DecodeAuthInfo<br />wolfSSL Entering DecodeSubjKeyId<br />wolfSSL Entering DecodeBasicCaConstraint<br />wolfSSL Entering DecodeAuthKeyId<br />Certificate Policy extension not supported yet.<br />wolfSSL Entering DecodeCrlDist<br />wolfSSL Entering GetAlgoId<br />About to verify certificate signature<br />No CA signer to verify with<br />Failed to verify Peer&#039;s cert<br />&nbsp; &nbsp; &nbsp; &nbsp; No callback override available, fatal<br />wolfSSL Leaving DoHandShakeMsgType(), return -188<br />wolfSSL Leaving DoHandShakeMsg(), return -188<br />wolfSSL error occured, error = -188<br />wolfSSL Entering SSL_get_error<br />wolfSSL Leaving SSL_get_error, return -188<br />wolfSSL Entering SSL_get_error<br />wolfSSL Leaving SSL_get_error, return -188<br />SSL Error &quot;ASN no signer error to confirm failure&quot;<br />**Error: SMTP_SSL_PROBLEM<br />wolfSSL Entering SSL_shutdown()<br />growing output buffer</p><p>Shrinking output buffer</p><p>wolfSSL Leaving SSL_shutdown(), return 2<br />wolfSSL Entering SSL_free<br />CTX ref count not 0 yet, no free<br />Shrinking input buffer</p><p>wolfSSL Leaving SSL_free, return 0<br />wolfSSL Entering SSL_CTX_free<br />CTX ref count down to 0, doing full free<br />wolfSSL Entering wolfSSL_CertManagerFree<br />wolfSSL Leaving SSL_CTX_free, return 0<br />**Error: Error sending e-mail.</p><p>If I set SSL_VERIFY_NONE I get the &quot; mp_exptmod error state&quot; error code returned from wolfSSL_connect() as before.</p><p>Can any one help?</p><p>Cheers,</p><p>Adam.</p>]]></description>
			<author><![CDATA[null@example.com (afull)]]></author>
			<pubDate>Thu, 13 Aug 2015 14:20:44 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2135.html#p2135</guid>
		</item>
		<item>
			<title><![CDATA[Re: mp_exptmod error state]]></title>
			<link>https://www.wolfssl.com/forums/post2130.html#p2130</link>
			<description><![CDATA[<p>Hi Adam,</p><p>When getting wolfSSL up and running on a new platform, we recommend running the wolfCrypt test app (or at least the subset of it that is applicable to what you are interested in using). This app is located at &lt;wolfssl_root&gt;/wolfcrypt/test/test.c.&nbsp; You can define NO_MAIN_DRIVER when compiling test.c into your code, which allows you to call the individual test functions (ex: rsa_test()) from your own main/driver function.</p><p>Have you tried this yet?&nbsp; It may help flush out if the underlying crypto is working correctly.</p><p>Thanks,<br />Chris</p>]]></description>
			<author><![CDATA[null@example.com (chrisc)]]></author>
			<pubDate>Tue, 11 Aug 2015 16:14:49 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2130.html#p2130</guid>
		</item>
		<item>
			<title><![CDATA[mp_exptmod error state]]></title>
			<link>https://www.wolfssl.com/forums/post2129.html#p2129</link>
			<description><![CDATA[<p>Hi,</p><p>I&#039;m a very new to wolfSSL and I am trying to send an e-mail with a TLS connection to a gmail server. The return from wolfSSL_connect() is &quot;mp_exptmod error state&quot;. I have no client certificates and have set SSL_VERIFY_NONE. Below is the trace output. Does any one know if this is a network transport error or a wolfSSL library configuration error?</p><p>Thanks in advance,</p><p>Adam.</p><p>Connecting to host: smtp.gmail.com<br />Resolved host address: 173.194.67.108<br />wolfSSL Entering SSL_library_init<br />wolfSSL Entering wolfSSL_Init<br />wolfSSL Entering WOLFSSL_CTX_new<br />wolfSSL Entering wolfSSL_CertManagerNew<br />wolfSSL Leaving WOLFSSL_CTX_new, return 0<br />wolfSSL Entering wolfSSL_CTX_set_verify<br />RXS:<br />220 smtp.gmail.com ESMTP v9sm3545903wjq.41 - gsmtp<br />RXE.<br />TXS:<br />EHLO PRIME<br />TXE.<br />RXS:<br />250-smtp.gmail.com at your service, [83.105.130.164]<br />250-SIZE 35882577<br />250-8BITMIME<br />250-STARTTLS<br />250-ENHANCEDSTATUSCODES<br />250-PIPELINING<br />250-CHUNKING<br />250 SMTPUTF8<br />RXE.<br />TXS:<br />STARTTLS<br />TXE.<br />RXS:<br />220 2.0.0 Ready to start TLS<br />RXE.<br />wolfSSL Entering SSL_new<br />wolfSSL Leaving SSL_new, return 0<br />wolfSSL Entering SSL_set_fd<br />wolfSSL Leaving SSL_set_fd, return 1<br />wolfSSL Entering SSL_connect()<br />growing output buffer</p><p>Shrinking output buffer</p><p>connect state: CLIENT_HELLO_SENT<br />growing input buffer</p><p>received record layer msg<br />wolfSSL Entering DoHandShakeMsg()<br />wolfSSL Entering DoHandShakeMsgType<br />processing server hello<br />wolfSSL Entering VerifyClientSuite<br />wolfSSL Leaving DoHandShakeMsgType(), return 0<br />wolfSSL Leaving DoHandShakeMsg(), return 0<br />growing input buffer</p><p>received record layer msg<br />wolfSSL Entering DoHandShakeMsg()<br />wolfSSL Entering DoHandShakeMsgType<br />processing certificate<br />Loading peer&#039;s cert chain<br />&nbsp; &nbsp; Put another cert into chain<br />&nbsp; &nbsp; Put another cert into chain<br />&nbsp; &nbsp; Put another cert into chain<br />wolfSSL Entering GetExplicitVersion<br />wolfSSL Entering GetMyVersion<br />Got Cert Header<br />wolfSSL Entering GetAlgoId<br />Got Algo ID<br />Getting Cert Name<br />Getting Cert Name<br />Got Subject Name<br />wolfSSL Entering GetAlgoId<br />Got Key<br />Parsed Past Key<br />wolfSSL Entering DecodeCertExtensions<br />wolfSSL Entering DecodeAuthKeyId<br />wolfSSL Entering DecodeSubjKeyId<br />wolfSSL Entering DecodeBasicCaConstraint<br />wolfSSL Entering DecodeKeyUsage<br />wolfSSL Entering DecodeCrlDist<br />Certificate Policy extension not supported yet.<br />wolfSSL Entering GetAlgoId<br />Chain cert not verified by option, not adding as CA<br />wolfSSL Entering GetExplicitVersion<br />wolfSSL Entering GetMyVersion<br />Got Cert Header<br />wolfSSL Entering GetAlgoId<br />Got Algo ID<br />Getting Cert Name<br />Getting Cert Name<br />Got Subject Name<br />wolfSSL Entering GetAlgoId<br />Got Key<br />Parsed Past Key<br />wolfSSL Entering DecodeCertExtensions<br />wolfSSL Entering DecodeAuthKeyId<br />wolfSSL Entering DecodeSubjKeyId<br />wolfSSL Entering DecodeBasicCaConstraint<br />wolfSSL Entering DecodeKeyUsage<br />wolfSSL Entering DecodeCrlDist<br />wolfSSL Entering DecodeAuthInfo<br />Certificate Policy extension not supported yet.<br />wolfSSL Entering GetAlgoId<br />Chain cert not verified by option, not adding as CA<br />Verifying Peer&#039;s cert<br />wolfSSL Entering GetExplicitVersion<br />wolfSSL Entering GetMyVersion<br />Got Cert Header<br />wolfSSL Entering GetAlgoId<br />Got Algo ID<br />Getting Cert Name<br />Getting Cert Name<br />Got Subject Name<br />wolfSSL Entering GetAlgoId<br />Got Key<br />Parsed Past Key<br />wolfSSL Entering DecodeCertExtensions<br />wolfSSL Entering DecodeExtKeyUsage<br />wolfSSL Entering DecodeAltNames<br />wolfSSL Entering DecodeAuthInfo<br />wolfSSL Entering DecodeSubjKeyId<br />wolfSSL Entering DecodeBasicCaConstraint<br />wolfSSL Entering DecodeAuthKeyId<br />Certificate Policy extension not supported yet.<br />wolfSSL Entering DecodeCrlDist<br />wolfSSL Entering GetAlgoId<br />Verified Peer&#039;s cert<br />wolfSSL Leaving DoHandShakeMsgType(), return 0<br />wolfSSL Leaving DoHandShakeMsg(), return 0<br />received record layer msg<br />wolfSSL Entering DoHandShakeMsg()<br />wolfSSL Entering DoHandShakeMsgType<br />No KeyExchange required<br />processing server hello done<br />wolfSSL Leaving DoHandShakeMsgType(), return 0<br />wolfSSL Leaving DoHandShakeMsg(), return 0<br />connect state: HELLO_AGAIN<br />connect state: HELLO_AGAIN_REPLY<br />connect state: FIRST_REPLY_DONE<br />connect state: FIRST_REPLY_FIRST<br />wolfSSL error occured, error = -112<br />wolfSSL Entering SSL_get_error<br />wolfSSL Leaving SSL_get_error, return -112<br />wolfSSL Entering SSL_get_error<br />wolfSSL Leaving SSL_get_error, return -112<br />SSL Error &quot;mp_exptmod error state&quot;<br />**Error: SMTP_SSL_PROBLEM<br />wolfSSL Entering SSL_shutdown()<br />growing output buffer</p><p>Shrinking output buffer</p><p>wolfSSL Leaving SSL_shutdown(), return 2<br />wolfSSL Entering SSL_free<br />CTX ref count not 0 yet, no free<br />Shrinking input buffer</p><p>wolfSSL Leaving SSL_free, return 0<br />wolfSSL Entering SSL_CTX_free<br />CTX ref count down to 0, doing full free<br />wolfSSL Entering wolfSSL_CertManagerFree<br />wolfSSL Leaving SSL_CTX_free, return 0<br />**Error: Error sending e-mail.</p>]]></description>
			<author><![CDATA[null@example.com (afull)]]></author>
			<pubDate>Tue, 11 Aug 2015 16:00:12 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2129.html#p2129</guid>
		</item>
	</channel>
</rss>
