if ((err = encrypt(key, sizeof(key), pt, ct, sizeof(pt)))) {
printf("encrypt error: %s\n", crypto_errstr(err));
return 1;
}
printh(ct);
if (select_crypto_if(iface2)) return 1;
if ((err = encrypt(key, sizeof(key), pt, ct, sizeof(pt)))) {
printf("encrypt error: %s\n", crypto_errstr(err));
return 1;
}
printh(ct);
if (select_crypto_if(iface2)) return 1;
- if ((err = decrypt(key, sizeof(key), ct, re, sizeof(ct)))) {
+ if ((err = decrypt(key, sizeof(key), ct, re, sizeof(re)))) {
- for (numifs = 0; select_crypto_if(numifs) == 0; numifs++)
- printf("%d: %s\n", numifs, if_name(numifs));
- printf("Testing %d interfaces\n", numifs);
+ for (numifs = 0; (name = crypto_init(numifs)); numifs++)
+ printf("%d: %s\n", numifs, name);
+ printf("Testing %d interfaces\n\n", numifs);