Skip to content

Commit

Permalink
Added new overload getAsReceiverCheckData(X509Certificate)
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Nov 4, 2024
1 parent 7edfad3 commit 8b241a0
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,27 @@ public static void setCheckSigningCertificateRevocation (final boolean b)
*/
@Nonnull
public static Phase4PeppolReceiverConfiguration getAsReceiverCheckData ()
{
return getAsReceiverCheckData (getAPCertificate ());
}

/**
* Get the statically configured data as a
* {@link Phase4PeppolReceiverConfiguration} instance. Returns
* <code>null</code> if the checks are disabled, or if at least one mandatory
* field is not set.<br>
* Changed to NonNull in 2.8.1
*
* @param aAPCertificate
* The AP certificate to use. May be <code>null</code>.
* @return The instance data or <code>null</code>.
* @since 3.0.0
*/
@Nonnull
public static Phase4PeppolReceiverConfiguration getAsReceiverCheckData (@Nullable final X509Certificate aAPCertificate)
{
final ISMPServiceMetadataProvider aSMPClient = getSMPClient ();
final String sAS4EndpointURL = getAS4EndpointURL ();
final X509Certificate aAPCertificate = getAPCertificate ();

final boolean bReceiverCheckEnabled;
if (aSMPClient == null || StringHelper.hasNoText (sAS4EndpointURL) || aAPCertificate == null)
Expand Down

0 comments on commit 8b241a0

Please sign in to comment.