Replace MBEDTLS_ERR_OID_BUF_TOO_SMALL with PSA_ERROR_BUFFER_TOO_SMALL
Remove the definition of `MBEDTLS_ERR_OID_BUF_TOO_SMALL` in `x509_oid.h`,
and use the corresponding PSA error instead.
```
git grep -l MBEDTLS_ERR_OID_BUF_TOO_SMALL | xargs perl -i -pe 's/\bMBEDTLS_ERR_OID_BUF_TOO_SMALL\b/PSA_ERROR_BUFFER_TOO_SMALL/p'
edit library/x509_oid.h
```
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/library/x509.c b/library/x509.c
index a3d7a18..fe4e3e3 100644
--- a/library/x509.c
+++ b/library/x509.c
@@ -849,7 +849,7 @@
ret = mbedtls_snprintf(p, n, ".%u", value);
}
if (ret < 2 || (size_t) ret >= n) {
- return MBEDTLS_ERR_OID_BUF_TOO_SMALL;
+ return PSA_ERROR_BUFFER_TOO_SMALL;
}
n -= (size_t) ret;
p += ret;
@@ -912,7 +912,7 @@
p += ret;
ret = mbedtls_snprintf(p, n, "=");
print_hexstring = 1;
- } else if (ret == MBEDTLS_ERR_OID_BUF_TOO_SMALL) {
+ } else if (ret == PSA_ERROR_BUFFER_TOO_SMALL) {
return MBEDTLS_ERR_X509_BUFFER_TOO_SMALL;
} else {
ret = mbedtls_snprintf(p, n, "\?\?=");