12b3dfece9857ec46cfeddbef9cded38e4f717ef
[openssl.git] / doc / crypto / X509_get_subject_name.pod
1 =pod
2
3 =head1 NAME
4
5 X509_get_subject_name, X509_set_subject_name, X509_get_issuer_name,
6 X509_set_issuer_name, X509_REQ_get_subject_name, X509_REQ_set_subject_name,
7 X509_CRL_get_issuer, X509_CRL_set_issuer_name - get and set issuer or
8 subject names.
9
10 =head1 SYNOPSIS
11
12  #include <openssl/x509.h>
13
14  X509_NAME *X509_get_subject_name(X509 *x);
15  int X509_set_subject_name(X509 *x, X509_NAME *name);
16
17  X509_NAME *X509_get_issuer_name(X509 *x);
18  int X509_set_issuer_name(X509 *x, X509_NAME *name);
19
20  X509_NAME *X509_REQ_get_subject_name(X509_REQ *req);
21  int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
22
23  X509_NAME *X509_CRL_get_issuer(X509_CRL *crl);
24  int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
25
26 =head1 DESCRIPTION
27
28 X509_get_subject_name() returns the subject name of certificate B<x>. The
29 returned value is an internal pointer which B<MUST NOT> be freed.
30
31 X509_set_subject_name() sets the issuer name of certificate B<x> to
32 B<name>. The B<name> parameter is copied internally and should be freed
33 up when it is no longer needed.
34
35 X509_get_issuer_name() and X509_set_issuer_name() are identical to
36 X509_get_subject_name() and X509_set_subject_name() except the get and
37 set the isssuer name of B<x>.
38
39 Similarly X509_REQ_get_subject_name(), X509_REQ_set_subject_name(),
40  X509_CRL_get_issuer() and X509_CRL_set_issuer_name() get or set the subject
41 or issuer names of certifcate requests of CRLs respectively.
42
43 =head1 RETURN VALUES
44
45 X509_get_subject_name(), X509_get_issuer_name(), X509_REQ_get_subject_name()
46 and X509_CRL_get_issuer() return an B<X509_NAME> pointer.
47
48 X509_set_subject_name(), X509_set_issuer_name(), X509_REQ_set_subject_name()
49 and X509_CRL_set_issuer_name() return 1 for success and 0 for failure.
50
51 =head1 HISTORY
52
53 X509_get_subject_name(), X509_set_subject_name() and X509_get_issuer_name(),
54 X509_set_issuer_name(), X509_REQ_set_subject_name() and
55 X509_CRL_set_issuer_name() are avaiable in all versions of OpenSSL.
56
57 X509_REQ_get_subject_name() is a function in OpenSSL 1.1.0 and a macro in
58 earlier versions.
59
60 X509_CRL_get_issuer() is a function in OpenSSL 1.1.0. It was first added
61 to OpenSSL 1.0.0 as a macro.
62
63 =head1 SEE ALSO
64
65 L<d2i_X509(3)>,
66 L<ERR_get_error(3)>, L<d2i_X509(3)>
67 L<X509_CRL_get0_by_serial(3)>,
68 L<X509_get0_signature(3)>,
69 L<X509_get_ext_d2i(3)>,
70 L<X509_get_extension_flags(3)>,
71 L<X509_get_pubkey(3)>,
72 L<X509_NAME_add_entry_by_txt(3)>,
73 L<X509_NAME_ENTRY_get_object(3)>,
74 L<X509_NAME_get_index_by_NID(3)>,
75 L<X509_NAME_print_ex(3)>,
76 L<X509_new(3)>,
77 L<X509_sign(3)>,
78 L<X509V3_get_d2i(3)>,
79 L<X509_verify_cert(3)>
80
81 =cut