Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Applet Certificate CRL Distribution Point LDAP URL with no host

Telmo SimõesJan 6 2014 — edited Jan 8 2014

Hello,

I'm developing a web application that uses applets signed with a certificate issued by the customer CA. That certificate contains an URL to a CRL Distribution Point that does not define the host and port. The certificate attributes "CRL Distribution Points" and "Authority Information Access" contain an URL similar to "ldap:///CN=my-cn...".

The log files generated by the Certificate Revocation-Checking API (C:\Users\[my_user]\AppData\LocalLow\Sun\Java\Deployment\log) indicate that the values "localhost" and "389" are being used for host and port.

...

certpath: DistributionPointFetcher.getCRLs: Checking CRLDPs for CN=xxx, O=yyy, L=zzz, C=PT

certpath: Trying to fetch CRL from DP ldap:///CN=_my-cn_?certificateRevocationList?base?objectClass=cRLDistributionPoint

certpath: CertStore URI:ldap:///CN=_my-cn_?certificateRevocationList?base?objectClass=cRLDistributionPoint

...

network: Connecting http://localhost:389/ with proxy=DIRECT

...

certpath: LDAPCertStore.engineInit about to throw InvalidAlgorithmParameterException

javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused: connect]

  at com.sun.jndi.ldap.Connection.<init>(Unknown Source)

...

Can you confirm that the host is mandatory, otherwise the default value "localhost" is used?

I read in the LDAP RFC (http://www.ietf.org/rfc/rfc4516.txt) that if the "host" field is not present, the client must have some a priori knowledge of an appropriate LDAP server to contact. Is it possible to configure the "host" attribute?

I'm using the JRE version 1.7.0_45 (build 1.7.0_45-b18).

Best regards,

Telmo Simões

Comments

Tridus

As an update, this seems to happen if sqlnet.ora is found at all. I can remove everything from sqlnet.ora it and it still happens. If I rename sqlnet.ora to something else, the problem goes away, it picks up tnsnames.ora, and things work just fine.

Tridus

Just posting to add that it's still an issue with the 3.1 release version.

Alex Keh-Oracle

My dev team found the bug. It looks like a regression. We filed a bug (31867606) on your behalf and will work on a fix.

Tridus

Great, thank you!

KlausER

We are experiencing the same issue.

As a workaround I have renamed the sqlnet.ora. I am not sure if this causes any side effects.

We have already filed an issue on github: https://github.com/oracle/dotnet-db-samples/issues/99

Alex Keh-Oracle

This bug has been fixed and will be part of our next ODP.NET 19.10 release.

Alex Keh-Oracle

While you're waiting for a fix, there are a couple workarounds. You can either:

  1. Include the System.DirectoryServices.Protocols NuGet package or
  2. Don't set TnsAdmin via OracleConfiguration. Use other means to get the configuration info.
KlausER

Including the package System.DirectoryServices.Protocols solved the problem for us.

Many thanks for the quick response.

User_UU1WZ

It seems like the the core version is prone to this, too.
Are you aware of that ?

User_UU1WZ

Ok this was non-sense... I´m sorry...
The question to ask would be: What exactly do I need to get the fix ? Using Oracle.Enitity.Framework.Core 3.19.80 still results in that issue - I still need to include the protocols package...

Alex Keh-Oracle
Answer

Oracle uploaded a fix for this bug last night on NuGet Gallery. You can download it here: https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core/

Marked as Answer by Tridus · Oct 22 2020
Tridus

Works great, thanks Alex!

Tridus

If you're only pulling in Oracle.EntityFramework.Core, it's probably grabbing the minimum version of Oracle.ManagedDataAccess.Core that it requires, which is where the bug is present.
Go into NuGet and get Oracle.ManagedDataAccess.Core 2.19.91 specifically. That resolves the issue.

1 - 13
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 3 2014
Added on Jan 6 2014
0 comments
1,488 views