/* Free RSA from use with Nitrox device */ void RsaFreeCavium(RsaKey* rsa) { if (rsa == NULL) return; CspFreeContext(CONTEXT_SSL, rsa->contextHandle, rsa->devId); rsa->magic = 0; }
/* Free Hmac from use with Nitrox device */ void wc_HmacFreeCavium(Hmac* hmac) { if (hmac == NULL) return; CspFreeContext(CONTEXT_SSL, hmac->contextHandle, hmac->devId); hmac->magic = 0; XFREE(hmac->data, NULL, DYNAMIC_TYPE_CAVIUM_TMP); hmac->data = NULL; }
/* Free Arc4 from use with Nitrox device */ void Arc4FreeCavium(Arc4* arc4) { if (arc4 == NULL) return; if (arc4->magic != CYASSL_ARC4_CAVIUM_MAGIC) return; CspFreeContext(CONTEXT_SSL, arc4->contextHandle, arc4->devId); arc4->magic = 0; }
/* Free Des3 from use with Nitrox device */ void Des3_FreeCavium(Des3* des3) { if (des3 == NULL) return; if (des3->magic != CYASSL_3DES_CAVIUM_MAGIC) return; CspFreeContext(CONTEXT_SSL, des3->contextHandle, des3->devId); des3->magic = 0; }