src/share/native/sun/security/ec/impl/ec.c

Print this page

        

*** 53,72 **** #endif #include "ecl-exp.h" #include "mpi.h" #include "ecc_impl.h" - #ifdef _KERNEL - #define PORT_ZFree(p, l) bzero((p), (l)); kmem_free((p), (l)) - #else - #ifndef _WIN32 - #define PORT_ZFree(p, l) bzero((p), (l)); free((p)) - #else - #define PORT_ZFree(p, l) memset((p), 0, (l)); free((p)) - #endif /* _WIN32 */ - #endif - /* * Returns true if pointP is the point at infinity, false otherwise */ PRBool ec_point_at_infinity(SECItem *pointP) --- 53,62 ----
*** 420,434 **** if (err < MP_OKAY) { MP_TO_SEC_ERROR(err); rv = SECFailure; } if (rv != SECSuccess && privKeyBytes) { ! #ifdef _KERNEL ! kmem_free(privKeyBytes, 2*len); ! #else ! free(privKeyBytes); ! #endif privKeyBytes = NULL; } return privKeyBytes; } --- 410,420 ---- if (err < MP_OKAY) { MP_TO_SEC_ERROR(err); rv = SECFailure; } if (rv != SECSuccess && privKeyBytes) { ! PORT_ZFree(privKeyBytes, 2*len); privKeyBytes = NULL; } return privKeyBytes; }