The current isSchemePermitted methods give us the identity and entity auth, and identity and keyx scheme, but not at the same time. To properly enforce a mix of Entity Auth schemes and KeyX schemes, we would need to know about both of them at the same time. E.g. only allow Unauthenticated entity auth for an identity, IIF they're doing SymmetricWrappedExchange key exchange.
The simple change would be create a new method AuthenticationUtils::isSchemePermitted that takes both entity auth scheme and key exchange scheme. The bigger problem is where that would be called from. MSL currently assumes that each Entity Auth and KeyX Auth will call the appropriate methods on AuthenticationUtils. Neither have both of those schemes handy. Can a form of isSchemePermitted be called from msl-core itself instead of relying on the individual schemes?
The current isSchemePermitted methods give us the identity and entity auth, and identity and keyx scheme, but not at the same time. To properly enforce a mix of Entity Auth schemes and KeyX schemes, we would need to know about both of them at the same time. E.g. only allow Unauthenticated entity auth for an identity, IIF they're doing SymmetricWrappedExchange key exchange.
The simple change would be create a new method AuthenticationUtils::isSchemePermitted that takes both entity auth scheme and key exchange scheme. The bigger problem is where that would be called from. MSL currently assumes that each Entity Auth and KeyX Auth will call the appropriate methods on AuthenticationUtils. Neither have both of those schemes handy. Can a form of isSchemePermitted be called from msl-core itself instead of relying on the individual schemes?