Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLE implementation #120

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

monu-kumar-visa
Copy link
Contributor

No description provided.

@log_obj.logger.error(ExceptionHandler.new.new_api_exception err)
raise err
end
if [email protected]? && [email protected]_a?(Hash)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check for Map value type should be <String,Boolean>

if is_mle_supported_by_cybs_for_api && merchant_config.useMLEGlobally
is_mle_for_api = true
end
if merchant_config.mapToControlMLEonAPI.nil? && merchant_config.mapToControlMLEonAPI.nil?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why same condition check for 2 times?

certificate = get_certificate(merchant_config, @log_obj)
validate_certificate(certificate, merchant_config, @log_obj)
serial_number = extract_serial_number_from_certificate(certificate)
if serial_number.nil?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if serial number is null then we can put default serial number from cert as same as implemented in Java.

end
end

def validate_certificate(certificate, merchant_config, log_obj)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't pass merchant_config, pass only required parameter such as key_alias. IF it is generic function then try to put in certificate utility if available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants