/* serverinfo file format versions */
-# define SERVERINFOV1 1
-# define SERVERINFOV2 2
+# define SSL_SERVERINFOV1 1
+# define SSL_SERVERINFOV2 2
/* Set serverinfo data for the current active cert. */
__owur int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
if (serverinfo == NULL || serverinfo_length == 0)
return 0;
- if (version != SERVERINFOV1 && version != SERVERINFOV2)
+ if (version != SSL_SERVERINFOV1 && version != SSL_SERVERINFOV2)
return 0;
if (!PACKET_buf_init(&pkt, serverinfo, serverinfo_length))
if (ctx == NULL)
continue;
- if (version == SERVERINFOV1) {
+ if (version == SSL_SERVERINFOV1) {
if (!SSL_CTX_add_server_custom_ext(ctx, ext_type,
serverinfo_srv_add_cb,
NULL, NULL,
int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
size_t serverinfo_length)
{
- return SSL_CTX_use_serverinfo_ex(ctx, SERVERINFOV1, serverinfo,
+ return SSL_CTX_use_serverinfo_ex(ctx, SSL_SERVERINFOV1, serverinfo,
serverinfo_length);
}
goto end;
}
if (strncmp(name, namePrefix1, strlen(namePrefix1)) == 0) {
- version = SERVERINFOV1;
+ version = SSL_SERVERINFOV1;
} else {
if (strlen(name) < strlen(namePrefix2)) {
SSLerr(SSL_F_SSL_CTX_USE_SERVERINFO_FILE,
SSL_R_PEM_NAME_BAD_PREFIX);
goto end;
}
- version = SERVERINFOV2;
+ version = SSL_SERVERINFOV2;
}
/*
* Check that the decoded PEM data is plausible (valid length field)
*/
- if (version == SERVERINFOV1) {
+ if (version == SSL_SERVERINFOV1) {
/* 4 byte header: 2 bytes type, 2 bytes len */
if (extension_length < 4
|| (extension[2] << 8) + extension[3]