SSL Issue

This morning when I tried to shop some products on I received the following SSL error:-

Your connection is not private
Attackers might be trying to steal your information from (for example, passwords, messages, or credit cards). Learn more

So, I took a look at the certificate and found it to be for the domain * instead of

Taking a look at the certificate chain, it seems that this certificate was issued by Amazon.

The domain is also owned by Amazon Technologies, Inc.

Which is the same as the domain

So, everything looks okay here.

If I manually go to the Privacy Page of, it is serving the correct SSL certificates:-

With a much shorter certificate chain.

I also checked the domain on SSL Shopper to make sure that this isn’t something on my end.

If I ignore the certificate error, I am able to go to the page which now serves the correct certificate. Most likely, this is a deployment error and not a hack. I wonder how Amazon is serving multiple certificates for the same domain.

Update: The error is with the host The www version of the domain is working fine. So, use to be safe.

Change the error class of asp-for in .NET Core’s MVC

This is a problem I ran into when converting my Bootstrap 3 based site to MDB which is based on Bootstrap 4.

The validation class in MDB is is-invalid as opposed to input-validation-error. I think it’s because of Bootstrap as opposed to MDB itself. But, in any case I had to change it with minimal code.

One solution is given here.

Adding the @Html.FieldHasError(m => m.Password) in the class attribute of every input seems to be too much work. So, here is my solution that uses TagHelper instead of extension methods on IHtmlHelper.

[HtmlTargetElement("input", Attributes = "md-for", TagStructure = TagStructure.WithoutEndTag)]
public class MdInputTagHelper : InputTagHelper
    public MdInputTagHelper(IHtmlGenerator generator)
        : base(generator)

    public ModelExpression MdFor 
        get => For;
        set => For = value;

    public override void Process(TagHelperContext context, TagHelperOutput output)
        base.Process(context, output);

        var fullName = NameAndIdProvider.GetFullHtmlFieldName(ViewContext, For.Name);

        if (ViewContext.ViewData.ModelState.TryGetValue(fullName, out var entry) && entry.Errors.Count > 0)
            output.AddClass("is-invalid", HtmlEncoder.Default);
            output.RemoveClass("input-validation-error", HtmlEncoder.Default);

Now, to use the class invalid-feedback in your inputs you have to do a single change, replace asp-for in the input tag with md-for.

<div class="md-form">
    <i class="fas fa-envelope prefix"></i>
    <input md-for="Input.Email" class="form-control">
    <label asp-for="Input.Email">Your email</label>
    <span class="invalid-feedback" asp-validation-for="Input.Email"></span>

One last thing, remember to import the tag helper in your _ViewImports.cshtml file:-

@addTagHelper Maxotek.WebAppUtils.Helpers.MdInputTagHelper, Maxotek.WebAppUtils