int gnutls_x509_crt_get_dn_by_oid(gnutls_x509_crt_t cert, const char *oid,
				  int indx, unsigned int raw_flag,
				  void *buf, size_t * sizeof_buf)
{
    if (cert == NULL) {
	gnutls_assert();
	return GNUTLS_E_INVALID_REQUEST;
    }

    return _gnutls_x509_parse_dn_oid(cert->cert,
				     "tbsCertificate.subject.rdnSequence",
				     oid, indx, raw_flag, buf, sizeof_buf);
}
int gnutls_x509_crt_get_dn_by_oid(gnutls_x509_crt_t cert, const char *oid,
				  int indx, unsigned int raw_flag,
				  void *buf, size_t * sizeof_buf)
{
    if (cert == NULL) {
	gnutls_assert();
	return GNUTLS_E_INVALID_REQUEST;
    }

    return _gnutls_x509_parse_dn_oid(cert->cert,
				     "tbsCertificate.subject.rdnSequence",
				     oid, indx, raw_flag, buf, sizeof_buf);
}