Lines Matching defs:ctx

145 	HMAC_CTX *ctx = NULL, *ctx2 = NULL;
169 if ((ctx = HMAC_CTX_new()) == NULL) {
173 if (HMAC_Init_ex(ctx, NULL, 0, NULL, NULL)) {
178 if (HMAC_Update(ctx, test[4].data, test[4].data_len)) {
179 printf("Should fail HMAC_Update with ctx not set up (test 4)\n");
183 if (HMAC_Init_ex(ctx, NULL, 0, EVP_sha1(), NULL)) {
188 if (HMAC_Update(ctx, test[4].data, test[4].data_len)) {
189 printf("Should fail HMAC_Update with ctx not set up (test 4)\n");
195 HMAC_CTX_reset(ctx);
196 if (HMAC_Init_ex(ctx, test[4].key, test[4].key_len, NULL, NULL)) {
201 if (HMAC_Update(ctx, test[4].data, test[4].data_len)) {
202 printf("Should fail HMAC_Update with ctx not set up (test 5)\n");
206 if (HMAC_Init_ex(ctx, test[4].key, -1, EVP_sha1(), NULL)) {
211 if (!HMAC_Init_ex(ctx, test[4].key, test[4].key_len, EVP_sha1(), NULL)) {
216 if (!HMAC_Update(ctx, test[4].data, test[4].data_len)) {
221 if (!HMAC_Final(ctx, buf, &len)) {
233 if (HMAC_Init_ex(ctx, NULL, 0, EVP_sha256(), NULL)) {
238 if (!HMAC_Init_ex(ctx, test[4].key, test[4].key_len, EVP_sha256(), NULL)) {
243 if (!HMAC_Update(ctx, test[5].data, test[5].data_len)) {
248 if (!HMAC_Final(ctx, buf, &len)) {
260 if (!HMAC_Init_ex(ctx, test[6].key, test[6].key_len, NULL, NULL)) {
265 if (!HMAC_Update(ctx, test[6].data, test[6].data_len)) {
270 if (!HMAC_Final(ctx, buf, &len)) {
284 HMAC_CTX_reset(ctx);
285 if (!HMAC_Init_ex(ctx, test[7].key, test[7].key_len, EVP_sha1(), NULL)) {
290 if (!HMAC_Update(ctx, test[7].data, test[7].data_len)) {
299 if (!HMAC_CTX_copy(ctx2, ctx)) {
318 HMAC_CTX_free(ctx);