pub struct X509PurposeRef(_);
Expand description

A reference to an [X509_PURPOSE].

Implementations

Get the internal table index of an X509_PURPOSE for a given short name. Valid short names include

  • “sslclient”,
  • “sslserver”,
  • “nssslserver”,
  • “smimesign”,
  • “smimeencrypt”,
  • “crlsign”,
  • “any”,
  • “ocsphelper”,
  • “timestampsign” The index can be used with X509PurposeRef::from_idx() to get the purpose.

Get an X509PurposeRef for a given index value. The index can be obtained from e.g. X509PurposeRef::get_by_sname().

This corresponds to X509_PURPOSE_get0.

Get the purpose value from an X509Purpose structure. This value is one of

  • X509_PURPOSE_SSL_CLIENT
  • X509_PURPOSE_SSL_SERVER
  • X509_PURPOSE_NS_SSL_SERVER
  • X509_PURPOSE_SMIME_SIGN
  • X509_PURPOSE_SMIME_ENCRYPT
  • X509_PURPOSE_CRL_SIGN
  • X509_PURPOSE_ANY
  • X509_PURPOSE_OCSP_HELPER
  • X509_PURPOSE_TIMESTAMP_SIGN

Trait Implementations

Implements a wrapper type for the static X509_PURPOSE table in OpenSSL.

The raw C type.
Constructs a shared instance of this type from its raw type.
Constructs a mutable reference of this type from its raw type.
Returns a raw pointer to the wrapped value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.