Sortix main manual
This manual documents Sortix main. You can instead view this document in the latest official manual.
NAME
X509_PUBKEY_new, X509_PUBKEY_free, X509_PUBKEY_set, X509_PUBKEY_get0, X509_PUBKEY_get, d2i_X509_PUBKEY, i2d_X509_PUBKEY, d2i_PUBKEY, i2d_PUBKEY, d2i_PUBKEY_bio, d2i_PUBKEY_fp, i2d_PUBKEY_fp, i2d_PUBKEY_bio, X509_PUBKEY_set0_param, X509_PUBKEY_get0_param — X.509 SubjectPublicKeyInfo structureSYNOPSIS
#include <openssl/x509.h>X509_PUBKEY_new(void);
X509_PUBKEY_free(X509_PUBKEY *a);
X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
X509_PUBKEY_get0(X509_PUBKEY *key);
X509_PUBKEY_get(X509_PUBKEY *key);
d2i_X509_PUBKEY(X509_PUBKEY **val_out, const unsigned char **der_in, long length);
i2d_X509_PUBKEY(X509_PUBKEY *val_in, unsigned char **der_out);
d2i_PUBKEY(EVP_PKEY **val_out, const unsigned char **der_in, long length);
i2d_PUBKEY(EVP_PKEY *val_in, unsigned char **der_out);
d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **val_out);
d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **val_out);
i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *val_in);
i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *val_in);
X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj, int ptype, void *pval, unsigned char *penc, int penclen);
X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg, const unsigned char **pk, int *ppklen, X509_ALGOR **pa, X509_PUBKEY *pub);
DESCRIPTION
The X509_PUBKEY structure represents the ASN.1 SubjectPublicKeyInfo structure defined in RFC 5280 section 4.1 and used in certificates and certificate requests.RETURN VALUES
If the allocation fails, X509_PUBKEY_new() returns NULL and sets an error code that can be obtained by ERR_get_error(3). Otherwise it returns a pointer to the newly allocated structure.ERRORS
After failure of X509_PUBKEY_get0() or X509_PUBKEY_get(), one of the following diagnostics can be retrieved with ERR_get_error(3), ERR_GET_REASON(3), and ERR_reason_error_string(3):- X509_R_UNSUPPORTED_ALGORITHM “unsupported algorithm”
- The public key uses an algorithm unsupported by EVP_PKEY_set_type(3).
- X509_R_METHOD_NOT_SUPPORTED “method not supported”
- While the algorithm is known to EVP_PKEY_set_type(3), using it for decoding is not supported.
- X509_R_PUBLIC_KEY_DECODE_ERROR “public key decode error”
- Decoding the public key failed.
- ERR_R_MALLOC_FAILURE “malloc failure”
- Memory was exhausted when trying to allocate the new EVP_PKEY object.