Lines Matching defs:ctx

32 	SIGN_VERIFY_CONTEXT    * ctx,
45 if (! sess || ! ctx) {
48 if (ctx->active != FALSE) {
95 ctx->context_len = 0;
96 ctx->context = NULL;
126 ctx->context_len = sizeof (RSA_DIGEST_CONTEXT);
127 ctx->context = (CK_BYTE *)malloc(
129 if (! ctx->context) {
132 (void) memset(ctx->context, 0x0,
155 ctx->context_len = 0;
156 ctx->context = NULL;
192 ctx->context_len = 0;
193 ctx->context = NULL;
211 ctx->key = key;
212 ctx->mech.ulParameterLen = mech->ulParameterLen;
213 ctx->mech.mechanism = mech->mechanism;
214 ctx->mech.pParameter = ptr;
215 ctx->multi = FALSE;
216 ctx->active = TRUE;
217 ctx->recover = recover_mode;
223 sign_mgr_cleanup(SIGN_VERIFY_CONTEXT *ctx)
225 if (! ctx) {
228 ctx->key = 0;
229 ctx->mech.ulParameterLen = 0;
230 ctx->mech.mechanism = 0;
231 ctx->multi = FALSE;
232 ctx->active = FALSE;
233 ctx->recover = FALSE;
234 ctx->context_len = 0;
236 if (ctx->mech.pParameter) {
237 free(ctx->mech.pParameter);
238 ctx->mech.pParameter = NULL;
241 if (ctx->context) {
242 free(ctx->context);
243 ctx->context = NULL;
252 SIGN_VERIFY_CONTEXT * ctx,
258 if (! sess || ! ctx) {
261 if (ctx->active == FALSE) {
264 if (ctx->recover == TRUE) {
274 if (ctx->multi == TRUE) {
277 switch (ctx->mech.mechanism) {
279 return (rsa_pkcs_sign(sess, length_only, ctx,
284 return (rsa_hash_pkcs_sign(sess, length_only, ctx,
290 return (md5_hmac_sign(sess, length_only, ctx,
295 return (sha1_hmac_sign(sess, length_only, ctx,
305 SIGN_VERIFY_CONTEXT * ctx,
309 if (! sess || ! ctx || ! in_data) {
313 if (ctx->active == FALSE) {
316 if (ctx->recover == TRUE) {
319 ctx->multi = TRUE;
321 switch (ctx->mech.mechanism) {
324 return (rsa_hash_pkcs_sign_update(sess, ctx,
334 SIGN_VERIFY_CONTEXT * ctx,
338 if (! sess || ! ctx) {
341 if (ctx->active == FALSE) {
344 if (ctx->recover == TRUE) {
347 switch (ctx->mech.mechanism) {
351 ctx, signature, sig_len));
360 SIGN_VERIFY_CONTEXT * ctx,
366 if (! sess || ! ctx) {
369 if (ctx->active == FALSE) {
372 if (ctx->recover == FALSE) {
382 if (ctx->multi == TRUE) {
385 switch (ctx->mech.mechanism) {
387 return (rsa_pkcs_sign(sess, length_only, ctx,