Added support for digest algorithm SHA256
This commit is contained in:
parent
561746081f
commit
cd59fabe79
@ -61,8 +61,9 @@ public:
|
||||
|
||||
/** Supported digest algorithms (used for fingerprint). */
|
||||
enum DigestAlgorithm {
|
||||
DIGEST_MD5, /**< MD5 digest */
|
||||
DIGEST_SHA1 /**< SHA1 digest */
|
||||
DIGEST_MD5,
|
||||
DIGEST_SHA1,
|
||||
DIGEST_SHA256
|
||||
};
|
||||
|
||||
|
||||
|
@ -311,10 +311,15 @@ const byteArray X509Certificate_GnuTLS::getFingerprint(const DigestAlgorithm alg
|
||||
galgo = GNUTLS_DIG_MD5;
|
||||
break;
|
||||
|
||||
case DIGEST_SHA256:
|
||||
|
||||
galgo = GNUTLS_DIG_SHA256;
|
||||
break;
|
||||
|
||||
default:
|
||||
case DIGEST_SHA1:
|
||||
|
||||
galgo = GNUTLS_DIG_SHA;
|
||||
galgo = GNUTLS_DIG_SHA1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -556,6 +556,11 @@ const byteArray X509Certificate_OpenSSL::getFingerprint(const DigestAlgorithm al
|
||||
digest = EVP_md5();
|
||||
break;
|
||||
|
||||
case DIGEST_SHA256:
|
||||
|
||||
digest = EVP_sha256();
|
||||
break;
|
||||
|
||||
default:
|
||||
case DIGEST_SHA1:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user