<div dir="ltr"><div><div><div><div>Hi. I was trying to configure a test IdP to retrieve my test federation metadata, but it failed to download.<br><br></div>Here it is an extract of my relying-party.xml:<br><br><metadata:MetadataProvider id="URLMD" xsi:type="metadata:FileBackedHTTPMetadataProvider"<br>
metadataURL="<a href="https://cdsserver.inca.net.pe/metadata/inca-federation.xml">https://cdsserver.inca.net.pe/metadata/inca-federation.xml</a>"<br> backingFile="/opt/shibboleth-idp/metadata/inca-federation-metadata.xml"><br>
<br>...<br><br><security:TrustEngine id="shibboleth.MetadataTrustEngine" xsi:type="security:StaticExplicitKeySignature"><br> <security:Credential id="MyFederation1Credentials" xsi:type="security:X509Filesystem"><br>
<security:Certificate>/opt/shibboleth-idp/credentials/inca.crt</security:Certificate><br> </security:Credential><br></security:TrustEngine><br><br></div>But in my log I got the error:<br>
<br>javax.net.ssl.SSLPeerUnverifiedException: SSL peer failed hostname validation for name: null<br><br></div>I thought that maybe if I could point Java (in JAVA_OPTS in /etc/default/tomcat6) to the keystore from Shibboleth, and imported the certificate into the keystore, that could do the trick. It did, the error is gone, and the metadata from my test server is downloaded fine in my IdP.<br>
<br></div>My question is: Is this a bad practice? Is it ok to import certificate data directly to a keystore file? Or is there a way to make Java "aware" of a certain certificate, so the connection proceeds normally? Thanks in advance for your time.<br>
</div>