NID_hash and NID_ec_curve were interchanged
authorAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 27 Aug 2009 18:28:41 +0000 (20:28 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 27 Aug 2009 18:28:41 +0000 (20:28 +0200)
src/libstrongswan/plugins/openssl/openssl_ec_private_key.c

index 576eaf5..0bfe27f 100644 (file)
@@ -153,14 +153,14 @@ static bool sign(private_openssl_ec_private_key_t *this,
                case SIGN_ECDSA_WITH_SHA512_DER:
                        return build_der_signature(this, NID_sha512, data, signature);
                case SIGN_ECDSA_256:
-                       return build_curve_signature(this, scheme, NID_X9_62_prime256v1,
-                                                                                NID_sha256, data, signature);
+                       return build_curve_signature(this, scheme, NID_sha256, 
+                                                                                NID_X9_62_prime256v1, data, signature);
                case SIGN_ECDSA_384:
-                       return build_curve_signature(this, scheme, NID_secp384r1,
-                                                                                NID_sha384, data, signature);
+                       return build_curve_signature(this, scheme, NID_sha384,
+                                                                                NID_secp384r1, data, signature);
                case SIGN_ECDSA_521:
-                       return build_curve_signature(this, scheme, NID_secp521r1,
-                                                                                NID_sha512, data, signature);
+                       return build_curve_signature(this, scheme, NID_sha512,
+                                                                                NID_secp521r1, data, signature);
                default:
                        DBG1("signature scheme %N not supported",
                                 signature_scheme_names, scheme);