Skip to contentSkip to conversation

cipher final failed

Openvpn-devel Ng Siak Hooi 3 participants 3 messages Oct 17, 2003

lore
Share & tools
lore
#0 lore raw

Hi all,
I added one mode to openssl library, called AES-128-HECTR, where the
mode use 128 bits key, and 256 bits block size.
I managed to get it compiled, and run well with following command:

openssl aes-128-hectr -in a -out b -k test
and
openssl aes-128-hectr -d -in b -out c -k test

I have tried a few times, with big files (from 10Mb to 28Mb). and confirmed that the output file c is identical to a. (using md5sum to verify) So I should assumed that my implementation should be well.

Now I compiled openvpn with this new openssl library,
(I modified the file crypto.c at line 103, 297, 461 by adding the phase "|| mode==EVP_CIPH_HECTR_MODE")

I managed to start openvpn at both sides.
but when I ping B from A, (similarly ping A from B, A will get the error) B will get following errors:

95: select returned 1
96: read from UDP returned 148
97: UDP READ from 1.0.0.1:5000: DATA 34cab7ca f97a40ef c025c5e0 ddc799fc a8a7fa15 36193882 04cadb4b bad35dc[more...]
98: IP Address OK from 1.0.0.1:5000
99: DECRYPT IV: 36193882 04cadb4b bad35dc0 1e3d8856 78f3b89b 7522e576 91f9d66b 3cdc5910
100: Authenticate/Decrypt packet error: cipher final failed

Appreciate if anyone can let me know what is wrong some where? What is the possible places go wrong here?
Hope that anyone let me know, so that I can trace it out.

thanks and regards,
SH Ng

#1 lore raw

[Openvpn-devel] beta1.5_12 CRL

If someone is interested, I wrote a little patch for check if a certificate is revoked using a crl in PEM format generated from ca. I added a --crl-verify "crl.pem" option to specify the crl filename. It works for me ;)

Regards Stefano.

openvpn.c +4 -0
diff -Naurp openvpn-1.5_beta12/openvpn.c openvpn-1.5_beta12.diff/openvpn.c
@@ -836,6 +836,10 @@ openvpn (const struct options *options,
       /* Let user specify a script to verify the incoming certificate */
       tls_set_verify_command (options->tls_verify);
 
+      /* Let user specify a crl to check the incoming certificate */
+      tls_set_crl_verify (options->crl_file);
+
+
       if (!ks->ssl_ctx)
 	{
 	  /*
options.c +6 -0
diff -Naurp openvpn-1.5_beta12/options.c openvpn-1.5_beta12.diff/options.c
@@ -258,6 +258,7 @@ static const char usage_message[] =
   "                  control channel to protect against DoS attacks.\n"
   "                  f (required) is a shared-secret passphrase file.\n"
   "--askpass       : Get PEM password from controlling tty before we daemonize.\n"
+  "--crl-verify crl: Execute check of certificate against a CRL.\n"
   "--tls-verify cmd: Execute shell command cmd to verify the X509 name of a\n"
   "                  pending TLS connection that has otherwise passed all other\n"
   "                  tests of certification.  cmd should return 0 to allow\n"
@@ -1568,6 +1569,11 @@ add_option (struct options *options, int
       ++i;
       options->cipher_list = p[1];
     }
+  else if (streq (p[0], "crl-verify") && p[1])
+    {
+      ++i;
+      options->crl_file = p[1];
+    }
   else if (streq (p[0], "tls-verify") && p[1])
     {
       ++i;
options.h +1 -0
diff -Naurp openvpn-1.5_beta12/options.h openvpn-1.5_beta12.diff/options.h
@@ -188,6 +188,7 @@ struct options
   const char *priv_key_file;
   const char *cipher_list;
   const char *tls_verify;
+  const char *crl_file;
 
   /* Per-packet timeout on control channel */
   int tls_timeout;
ssl.c +58 -4

88 lines not on this page · raw message

#2 lore raw

Re: [Openvpn-devel] beta1.5_12 CRL

Quoted 6 lines · Stefano Bracalenti

If someone is interested, I wrote a little patch for check if a certificate is revoked using a crl in PEM format generated from ca. I added a --crl-verify "crl.pem" option to specify the crl filename. It works for me ;)

Regards Stefano.

Stefano,

Excellent work!

This feature has been requested several times, so I'm sure it will be well-received.

James