X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fppp-crypto.c;h=ca743270a8598cc8f1e2a0a6ec6ef9ebe489c503;hb=a25e52a87c3f5cbe2c2264f4e7c4c02439ac6717;hp=6dfe96266b2ada0d8898d2fa796b1e7538c588bb;hpb=3b87aa186a1a60709fe3884798b291e795776135;p=ppp.git diff --git a/pppd/ppp-crypto.c b/pppd/ppp-crypto.c index 6dfe962..ca74327 100644 --- a/pppd/ppp-crypto.c +++ b/pppd/ppp-crypto.c @@ -139,14 +139,6 @@ int PPP_CipherFinal(PPP_CIPHER_CTX *ctx, unsigned char *out, int *outl) return 0; } -void PPP_CIPHER_CTX_set_cipher_data(PPP_CIPHER_CTX *ctx, const unsigned char *key) -{ - if (ctx && ctx->cipher.set_key_fn) { - ctx->cipher.set_key_fn(ctx, key); - } -} - - int PPP_crypto_init() { int retval = 0; @@ -206,7 +198,7 @@ int test_md4() 0x73, 0x69, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, - 0x6b, 0x65, 0x79, 0x2e + 0x6b, 0x65, 0x79, 0x2e }; unsigned int hash_len; @@ -254,7 +246,7 @@ int test_md5() 0x73, 0x69, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, - 0x6b, 0x65, 0x79, 0x2e + 0x6b, 0x65, 0x79, 0x2e }; unsigned int hash_len; @@ -302,7 +294,7 @@ int test_sha() 0x73, 0x69, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, - 0x6b, 0x65, 0x79, 0x2e + 0x6b, 0x65, 0x79, 0x2e }; unsigned int hash_len; @@ -357,16 +349,16 @@ int test_des_encrypt() 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20 }; unsigned char expect[80] = { - 0x5d, 0xa7, 0x47, 0xc5, 0x1a, 0xb1, 0x71, 0xff, - 0xc8, 0x45, 0x7c, 0xa7, 0x07, 0xec, 0x4b, 0x13, - 0x47, 0x55, 0x77, 0xbc, 0xcf, 0x71, 0xd9, 0x27, - 0x23, 0x12, 0x2a, 0x17, 0x20, 0xad, 0xc1, 0x19, - 0x3e, 0x74, 0x38, 0x29, 0x48, 0xb0, 0xd2, 0xe2, - 0x18, 0x45, 0xdd, 0x8a, 0x9b, 0x8d, 0x40, 0xec, - 0x9e, 0x0c, 0x41, 0xa3, 0x36, 0x40, 0xf5, 0x91, - 0x41, 0x44, 0xde, 0xa1, 0xb5, 0x9d, 0x39, 0x99, - 0x23, 0x12, 0x2a, 0x17, 0x20, 0xad, 0xc1, 0x19, - 0xee, 0xe3, 0xbe, 0x0b, 0x83, 0x36, 0xe1, 0x25 + 0x45, 0xdb, 0x80, 0x45, 0x16, 0xd0, 0x6d, 0x60, + 0x92, 0x23, 0x4b, 0xd3, 0x9d, 0x36, 0xb8, 0x1a, + 0xa4, 0x1a, 0xf7, 0xb1, 0x60, 0xfb, 0x74, 0x16, + 0xa6, 0xdc, 0xe1, 0x14, 0xb7, 0xed, 0x48, 0x5a, + 0x2b, 0xed, 0x68, 0x9d, 0x19, 0xd6, 0xb1, 0xb8, + 0x91, 0xff, 0xea, 0x62, 0xac, 0xe7, 0x49, 0xdd, + 0xfa, 0x4d, 0xa4, 0x01, 0x3f, 0xea, 0xca, 0xb4, + 0xb6, 0xdc, 0xd3, 0x04, 0x45, 0x07, 0x74, 0xed, + 0xa6, 0xdc, 0xe1, 0x14, 0xb7, 0xed, 0x48, 0x5a, + 0xbb, 0x9b, 0x13, 0x31, 0xf4, 0xa9, 0x32, 0x49 }; unsigned char cipher[80] = {}; @@ -409,16 +401,16 @@ int test_des_decrypt() }; unsigned char cipher[80] = { - 0x5d, 0xa7, 0x47, 0xc5, 0x1a, 0xb1, 0x71, 0xff, - 0xc8, 0x45, 0x7c, 0xa7, 0x07, 0xec, 0x4b, 0x13, - 0x47, 0x55, 0x77, 0xbc, 0xcf, 0x71, 0xd9, 0x27, - 0x23, 0x12, 0x2a, 0x17, 0x20, 0xad, 0xc1, 0x19, - 0x3e, 0x74, 0x38, 0x29, 0x48, 0xb0, 0xd2, 0xe2, - 0x18, 0x45, 0xdd, 0x8a, 0x9b, 0x8d, 0x40, 0xec, - 0x9e, 0x0c, 0x41, 0xa3, 0x36, 0x40, 0xf5, 0x91, - 0x41, 0x44, 0xde, 0xa1, 0xb5, 0x9d, 0x39, 0x99, - 0x23, 0x12, 0x2a, 0x17, 0x20, 0xad, 0xc1, 0x19, - 0xee, 0xe3, 0xbe, 0x0b, 0x83, 0x36, 0xe1, 0x25 + 0x45, 0xdb, 0x80, 0x45, 0x16, 0xd0, 0x6d, 0x60, + 0x92, 0x23, 0x4b, 0xd3, 0x9d, 0x36, 0xb8, 0x1a, + 0xa4, 0x1a, 0xf7, 0xb1, 0x60, 0xfb, 0x74, 0x16, + 0xa6, 0xdc, 0xe1, 0x14, 0xb7, 0xed, 0x48, 0x5a, + 0x2b, 0xed, 0x68, 0x9d, 0x19, 0xd6, 0xb1, 0xb8, + 0x91, 0xff, 0xea, 0x62, 0xac, 0xe7, 0x49, 0xdd, + 0xfa, 0x4d, 0xa4, 0x01, 0x3f, 0xea, 0xca, 0xb4, + 0xb6, 0xdc, 0xd3, 0x04, 0x45, 0x07, 0x74, 0xed, + 0xa6, 0xdc, 0xe1, 0x14, 0xb7, 0xed, 0x48, 0x5a, + 0xbb, 0x9b, 0x13, 0x31, 0xf4, 0xa9, 0x32, 0x49 }; unsigned char expect[80] = { @@ -462,7 +454,8 @@ int test_des_decrypt() return success; } -int main(int argc, char *argv[]) { +int main(int argc, char *argv[]) +{ int failure = 0; if (!PPP_crypto_init()) {