Lines Matching refs:pool
31 static const apr_crypto_driver_t *get_driver(abts_case *tc, apr_pool_t *pool,
39 rv = apr_crypto_init(pool);
42 rv = apr_crypto_get_driver(&driver, name, params, &err, pool);
62 apr_pool_t *pool)
66 return get_driver(tc, pool, "nss", "dir=data");
71 apr_pool_t *pool)
74 return get_driver(tc, pool, "openssl", NULL);
78 static apr_crypto_t *make(abts_case *tc, apr_pool_t *pool,
89 apr_crypto_make(&f, driver, "engine=openssl", pool);
96 static const apr_crypto_key_t *passphrase(abts_case *tc, apr_pool_t *pool,
115 pool);
118 ABTS_NOT_IMPL(tc, apr_psprintf(pool,
145 static unsigned char *encrypt_block(abts_case *tc, apr_pool_t *pool,
163 rv = apr_crypto_block_encrypt_init(&block, iv, key, blockSize, pool);
225 static unsigned char *decrypt_block(abts_case *tc, apr_pool_t *pool,
243 rv = apr_crypto_block_decrypt_init(&block, blockSize, iv, key, pool);
315 static void crypto_block_cross(abts_case *tc, apr_pool_t *pool,
335 f1 = make(tc, pool, driver1);
336 f2 = make(tc, pool, driver2);
337 key1 = passphrase(tc, pool, driver1, f1, type, mode, doPad, description);
338 key2 = passphrase(tc, pool, driver2, f2, type, mode, doPad, description);
340 cipherText = encrypt_block(tc, pool, driver1, f1, key1, in, inlen,
342 plainText = decrypt_block(tc, pool, driver2, f2, key2, cipherText,
362 apr_pool_t *pool = NULL;
365 apr_pool_create(&pool, NULL);
367 rv = apr_crypto_init(pool);
370 apr_pool_destroy(pool);
379 apr_pool_t *pool = NULL;
385 apr_pool_create(&pool, NULL);
386 drivers[0] = get_openssl_driver(tc, pool);
387 drivers[1] = get_openssl_driver(tc, pool);
388 crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 0,
390 crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_ECB, 0,
392 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 0, in,
394 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 0, in,
396 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 0, in,
398 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 0, in,
400 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 0, in,
402 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 0, in,
404 apr_pool_destroy(pool);
413 apr_pool_t *pool = NULL;
419 apr_pool_create(&pool, NULL);
420 drivers[0] = get_nss_driver(tc, pool);
421 drivers[1] = get_nss_driver(tc, pool);
422 crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 0,
425 /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 0, in, inlen, "KEY_3DES_192/MODE_ECB"); */
426 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 0, in,
428 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 0, in,
430 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 0, in,
432 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 0, in,
434 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 0, in,
436 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 0, in,
438 apr_pool_destroy(pool);
447 apr_pool_t *pool = NULL;
453 apr_pool_create(&pool, NULL);
454 drivers[0] = get_nss_driver(tc, pool);
455 drivers[1] = get_openssl_driver(tc, pool);
457 crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 0,
461 /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 0, in, inlen, "KEY_3DES_192/MODE_ECB"); */
462 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 0, in,
464 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 0, in,
472 crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_CBC, 0, in, inlen, "KEY_AES_192/MODE_CBC");
473 crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_ECB, 0, in, inlen, "KEY_AES_192/MODE_ECB");
474 crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_CBC, 0, in, inlen, "KEY_AES_128/MODE_CBC");
475 crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_ECB, 0, in, inlen, "KEY_AES_128/MODE_ECB");
477 apr_pool_destroy(pool);
486 apr_pool_t *pool = NULL;
492 apr_pool_create(&pool, NULL);
493 drivers[0] = get_openssl_driver(tc, pool);
494 drivers[1] = get_nss_driver(tc, pool);
495 crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 0,
499 /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 0, in, inlen, "KEY_3DES_192/MODE_ECB"); */
501 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 0, in,
503 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 0, in,
511 crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_CBC, 0, in, inlen, "KEY_AES_192/MODE_CBC");
512 crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_ECB, 0, in, inlen, "KEY_AES_192/MODE_ECB");
513 crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_CBC, 0, in, inlen, "KEY_AES_128/MODE_CBC");
514 crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_ECB, 0, in, inlen, "KEY_AES_128/MODE_ECB");
516 apr_pool_destroy(pool);
525 apr_pool_t *pool = NULL;
531 apr_pool_create(&pool, NULL);
532 drivers[0] = get_openssl_driver(tc, pool);
533 drivers[1] = get_openssl_driver(tc, pool);
535 crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 1,
537 crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_ECB, 1,
539 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 1, in,
541 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_ECB, 1, in,
543 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 1, in,
545 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_ECB, 1, in,
547 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 1, in,
549 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_ECB, 1, in,
552 apr_pool_destroy(pool);
561 apr_pool_t *pool = NULL;
568 apr_pool_create(&pool, NULL);
569 drivers[0] = get_nss_driver(tc, pool);
570 drivers[1] = get_nss_driver(tc, pool);
572 crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 1,
575 /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 1, in, inlen, "KEY_3DES_192/MODE_ECB"); */
577 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 1, in,
581 /*crypto_block_cross(tc, pool, drivers, KEY_AES_256, MODE_ECB, 1, in, inlen, "KEY_AES_256/MODE_ECB");*/
583 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_192, APR_MODE_CBC, 1, in,
587 /*crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_ECB, 1, in, inlen, "KEY_AES_192/MODE_ECB");*/
589 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_128, APR_MODE_CBC, 1, in,
593 /*crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_ECB, 1, in, inlen, "KEY_AES_128/MODE_ECB");*/
595 apr_pool_destroy(pool);
604 apr_pool_t *pool = NULL;
610 apr_pool_create(&pool, NULL);
611 drivers[0] = get_nss_driver(tc, pool);
612 drivers[1] = get_openssl_driver(tc, pool);
614 crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 1,
618 /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 1, in, inlen, "KEY_3DES_192/MODE_ECB"); */
620 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 1, in,
624 /*crypto_block_cross(tc, pool, drivers, KEY_AES_256, MODE_ECB, 1, in, inlen, "KEY_AES_256/MODE_ECB");*/
631 crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_CBC, 1, in, inlen, "KEY_AES_192/MODE_CBC");
632 crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_ECB, 1, in, inlen, "KEY_AES_192/MODE_ECB");
633 crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_CBC, 1, in, inlen, "KEY_AES_128/MODE_CBC");
634 crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_ECB, 1, in, inlen, "KEY_AES_128/MODE_ECB");
636 apr_pool_destroy(pool);
645 apr_pool_t *pool = NULL;
651 apr_pool_create(&pool, NULL);
652 drivers[0] = get_openssl_driver(tc, pool);
653 drivers[1] = get_nss_driver(tc, pool);
654 crypto_block_cross(tc, pool, drivers, APR_KEY_3DES_192, APR_MODE_CBC, 1,
658 /* crypto_block_cross(tc, pool, drivers, KEY_3DES_192, MODE_ECB, 1, in, inlen, "KEY_3DES_192/MODE_ECB"); */
660 crypto_block_cross(tc, pool, drivers, APR_KEY_AES_256, APR_MODE_CBC, 1, in,
664 /*crypto_block_cross(tc, pool, drivers, KEY_AES_256, MODE_ECB, 1, in, inlen, "KEY_AES_256/MODE_ECB");*/
671 crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_CBC, 1, in, inlen, "KEY_AES_192/MODE_CBC");
672 crypto_block_cross(tc, pool, drivers, KEY_AES_192, MODE_ECB, 1, in, inlen, "KEY_AES_192/MODE_ECB");
673 crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_CBC, 1, in, inlen, "KEY_AES_128/MODE_CBC");
674 crypto_block_cross(tc, pool, drivers, KEY_AES_128, MODE_ECB, 1, in, inlen, "KEY_AES_128/MODE_ECB");
676 apr_pool_destroy(pool);
685 apr_pool_t *pool = NULL;
694 apr_pool_create(&pool, NULL);
695 driver = get_openssl_driver(tc, pool);
698 f = make(tc, pool, driver);
719 apr_pool_destroy(pool);
728 apr_pool_t *pool = NULL;
737 apr_pool_create(&pool, NULL);
738 driver = get_nss_driver(tc, pool);
741 f = make(tc, pool, driver);
762 apr_pool_destroy(pool);
771 apr_pool_t *pool = NULL;
778 apr_pool_create(&pool, NULL);
779 driver = get_openssl_driver(tc, pool);
782 f = make(tc, pool, driver);
795 apr_pool_destroy(pool);
804 apr_pool_t *pool = NULL;
811 apr_pool_create(&pool, NULL);
812 driver = get_nss_driver(tc, pool);
815 f = make(tc, pool, driver);
828 apr_pool_destroy(pool);