When installing current stable openssh with USE="X509 ldap" i get a message like "Ldap and smartcard are not supported when X509 is used. Disabling ldap and smartcard". So these features are not built, but the dependencies are still there. Theese should be changed to something like "!X509? ( ldap? ( foo ) )". The same is probably valid for smartcard, but i did not check this.
dont know what you're really referring to the openssh only pulls in ldap when USE=ldap
(In reply to comment #1) > the openssh only pulls in ldap when USE=ldap Which is useless w/ USE=X509 as ldap gets disabled (same with dev-libs/opensc, smartcard support is also disabled w/ USE=X509). virtual/pam dependency is equally unneeded w/ USE=static, pam gets disabled.
not worth the effort of tracking this since these things change between release according to patch differences if you have USE=ldap on your system then you're going to have ldap pulled in somehow ... whether it's by openssh is irrelevant