testing: Updated hasher tests
[strongswan.git] / src / libstrongswan / crypto / hashers / hasher.c
index 8e3b7de..e220593 100644 (file)
@@ -1,8 +1,9 @@
 /*
  * Copyright (C) 2012-2015 Tobias Brunner
+ * Copyright (C) 2015 Andreas Steffen
  * Copyright (C) 2005-2006 Martin Willi
  * Copyright (C) 2005 Jan Hutter
- * Hochschule fuer Technik Rapperswil
+ * HSR Hochschule fuer Technik Rapperswil
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -428,20 +429,23 @@ hash_algorithm_t hasher_from_signature_scheme(signature_scheme_t scheme)
                case SIGN_ECDSA_WITH_SHA256_DER:
                case SIGN_ECDSA_256:
                case SIGN_BLISS_WITH_SHA2_256:
-               case SIGN_BLISS_WITH_SHA3_256:
                        return HASH_SHA256;
                case SIGN_RSA_EMSA_PKCS1_SHA384:
                case SIGN_ECDSA_WITH_SHA384_DER:
                case SIGN_ECDSA_384:
                case SIGN_BLISS_WITH_SHA2_384:
-               case SIGN_BLISS_WITH_SHA3_384:
                        return HASH_SHA384;
                case SIGN_RSA_EMSA_PKCS1_SHA512:
                case SIGN_ECDSA_WITH_SHA512_DER:
                case SIGN_ECDSA_521:
                case SIGN_BLISS_WITH_SHA2_512:
-               case SIGN_BLISS_WITH_SHA3_512:
                        return HASH_SHA512;
+               case SIGN_BLISS_WITH_SHA3_256:
+                       return HASH_SHA3_256;
+               case SIGN_BLISS_WITH_SHA3_384:
+                       return HASH_SHA3_384;
+               case SIGN_BLISS_WITH_SHA3_512:
+                       return HASH_SHA3_512;
        }
        return HASH_UNKNOWN;
 }