gnutls_x509_crq_set_dn_by_oid(3)
π gnutls_x509_crq_set_dn_by_oid(3) π
okay bestie, welcome to the gnutls manual, section 3 (that's the library-functions section, iykyk) β¨ this one's about naming a certificate request, so likeβ¦ the β¨identityβ¨ part. let's get into it π«Ά
πΈ NAME πΈ
gnutls_x509_crq_set_dn_by_oid β it's an API function, periodt π
β¨ SYNOPSIS β¨
#include <gnutls/x509.h>
int gnutls_x509_crq_set_dn_by_oid(gnutls_x509_crq_t crq, const char *
oid, unsigned int raw_flag, const void * data, unsigned int
sizeof_data);
she's a little long, but she's iconic π
π¦ ARGUMENTS π¦
gnutls_x509_crq_t crqβ this one should contain agnutls_x509_crq_ttype. that's the cert request you're dressing up πconst char * oidβ holds an Object Identifier in a (0)-terminated string. yes, a zero-terminated string, like a normal C string bestie πunsigned int raw_flagβ must be0, or1if the data are DER encoded. so0= "here's my nice lil string",1= "here's raw DER bytes, don't touch" πconst void * dataβ a pointer to the input data πunsigned int sizeof_dataβ holds the size ofdata. don't forget her, she matters fr fr π
π DESCRIPTION π
so the vibe here is: this function sets the part of the name of the Certificate request subject that's specified by the given OID. it's giving "pick which field of the subject name you're filling in" π
the input string should be ASCII or UTF-8 encoded. no random encodings, okay? she's picky πΈ
some helper macros with popular OIDs can be found in gnutls/x509.h β go look, they're literally right there π«Ά
here's the important part though: with this function you can only set the known OIDs. wanna test if an OID is known? that's gnutls_x509_dn_oid_known(), use her π
and for OIDs that are not known (by gnutls)? then you gotta properly DER encode your data, and call this function with raw_flag set. no shortcuts, bestie, that's the rule β
not me making you DER encode your own stuffβ¦ but gnutls doesn't know those OIDs so she can't do it for you, that's just the deal π
π RETURNS π
on success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. so if it's negativeβ¦ something went wrong, bestie π
π REPORTING BUGS π
found a bug? report it to <bugs@gnutls.org> π«Ά they wanna know, fr fr
home page: <https://www.gnutls.org>
π COPYRIGHT π
copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. so like, keep the receipts, that's all she asks π
π SEE ALSO π
the full documentation for gnutls is maintained as a Texinfo manual. if the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit:
https://www.gnutls.org/manual/
aaaand that's the whole page, bestie π this was gnutls_x509_crq_set_dn_by_oid(3) from the gnutls manual, version 3.8.13 β slay, go name some certificate requests, mwah πβ¨π¦
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms