Skip to content
This repository was archived by the owner on Jan 6, 2022. It is now read-only.
This repository was archived by the owner on Jan 6, 2022. It is now read-only.

SmimeUtil is missing the API to return the "Signed by <from-address>", which email clients generally display #5

@bbottema

Description

@bbottema

If you open a signed message in for example Outlook or Thunderbird, they will show a field right under "To:", named "Signed by:". After a lot of research, it turns out it is the subject of a certificate, the person's address to which the certificate was issued to.

I'll provide a pull-request that pulls out this subject from the first available certificate in the message (partially based on this SO answer):

X509Certificate cert = ...;

X500Name x500name = new JcaX509CertificateHolder(cert).getSubject();
RDN cn = x500name.getRDNs(BCStyle.CN)[0];

return IETFUtils.valueToString(cn.getFirst().getValue());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions