--- a/jdk/src/java.base/share/classes/javax/crypto/Mac.java Thu Sep 25 13:03:27 2014 +0200
+++ b/jdk/src/java.base/share/classes/javax/crypto/Mac.java Thu Sep 25 12:24:19 2014 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -77,6 +77,11 @@
private static final Debug debug =
Debug.getInstance("jca", "Mac");
+ private static final Debug pdebug =
+ Debug.getInstance("provider", "Provider");
+ private static final boolean skipDebug =
+ Debug.isOn("engine=") && !Debug.isOn("mac");
+
// The provider
private Provider provider;
@@ -413,6 +418,11 @@
throw new InvalidKeyException("init() failed", e);
}
initialized = true;
+
+ if (!skipDebug && pdebug != null) {
+ pdebug.println("Mac." + algorithm + " algorithm from: " +
+ this.provider.getName());
+ }
}
/**
@@ -435,6 +445,11 @@
chooseProvider(key, params);
}
initialized = true;
+
+ if (!skipDebug && pdebug != null) {
+ pdebug.println("Mac." + algorithm + " algorithm from: " +
+ this.provider.getName());
+ }
}
/**