PartyAndCertificate
Keywords: net.corda.core.identity.PartyAndCertificate class
Date: 2023-09-18

net.corda.core.identity

## Class PartyAndCertificate

- net.corda.core.identity.PartyAndCertificate

-     public class PartyAndCertificate

  A full party plus the X.509 certificate and path linking the party back to a trust root. Equality of `class PartyAndCertificate` instances is based on the party only, as certificate and path are data associated with the party, not part of the identifier themselves.

  See Also:
    `class PartyAndCertificate`

- - ### Constructor Detail

    - #### PartyAndCertificate

          public PartyAndCertificate(@NotNull
                                     java.security.cert.CertPath certPath)

      A full party plus the X.509 certificate and path linking the party back to a trust root. Equality of `class PartyAndCertificate` instances is based on the party only, as certificate and path are data associated with the party, not part of the identifier themselves.

      See Also:
        `class PartyAndCertificate`

  - ### Method Detail

    - #### getCertificate

          @NotNull
          public java.security.cert.X509Certificate getCertificate()

    - #### getParty

          @NotNull
          public Party getParty()

    - #### getOwningKey

          @NotNull
          public java.security.PublicKey getOwningKey()

    - #### getName

          @NotNull
          public CordaX500Name getName()

    - #### component1

          @NotNull
          public Party component1()

    - #### component2

          @NotNull
          public java.security.cert.X509Certificate component2()

    - #### equals

          public boolean equals(@Nullable
                                java.lang.Object other)

    - #### hashCode

          public int hashCode()

    - #### toString

          @NotNull
          public java.lang.String toString()

    - #### verify

          @NotNull
          public java.security.cert.PKIXCertPathValidatorResult verify(@NotNull
                                                                                java.security.cert.TrustAnchor trustAnchor)

      Verify the certificate path is valid.

    - #### verify

          @NotNull
          public java.security.cert.PKIXCertPathValidatorResult verify(@NotNull
                                                                                java.util.Set<? extends java.security.cert.TrustAnchor> trustAnchors)

      Verify the certificate path is valid against one of the specified trust anchors.

    - #### getCertPath

          @NotNull
          public java.security.cert.CertPath getCertPath()