Why does openssl use SHA1 in ECC when I use secp384r1 curve I need a small clarification that why openssl using SHA1 in ECC when I am using secp384r1 curve, but in rfc they are saying we should use SHA2.

Thing here is am using nanoECC in my DTLS, nanoECC using SHA384 for secp384r1 but openssl is using SHA1. So which one to use, if openssl is wrong then how to set openssl to use SHA384 for secp384r1 curve.
I need a small clarification that why openssl using SHA1 in ECC when I am using secp384r1 curve, but in rfc they are saying we should use SHA2.


OpenSSL uses SHA-1 because RFC 4492 defines the use of ECC on SSL with SHA-1. It should also support SHA-384 as defined in RFC 5289.

Which hash algorithm is used in TLS depends on the cipher suite. For example:


TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA (uses SHA-1)
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA384 (uses SHA-384)