encoding: avoid UB when casting to tlv::SignatureTypeValue

Change-Id: I52ec0bef8527b6a52208dc07be75e790e504c47e
Refs: #4370
diff --git a/src/security/v2/certificate.cpp b/src/security/v2/certificate.cpp
index dc48c3e..31cb81d 100644
--- a/src/security/v2/certificate.cpp
+++ b/src/security/v2/certificate.cpp
@@ -166,7 +166,7 @@
 
   os << "Signature Information:\n";
   {
-    os << "  Signature Type: " << static_cast<tlv::SignatureTypeValue>(cert.getSignature().getType()) << "\n";
+    os << "  Signature Type: " << cert.getSignature().getType() << "\n";
 
     if (cert.getSignature().hasKeyLocator()) {
       os << "  Key Locator: ";