SSL_CONF_CTX_SET1_PREFIX(3ossl)
π SSL_CONF_CTX_set1_prefix β OpenSSL, bestie edition π
okay so this is the manual page for SSL_CONF_CTX_set1_prefix(3ossl) from the OpenSSL fam, and it's genuinely one of the shorter ones so we're gonna get through it together, no stress π«Ά
β¨ NAME β¨
SSL_CONF_CTX_set1_prefix β set the configuration context command prefix π
πΈ SYNOPSIS πΈ
#include <openssl/ssl.h>
unsigned int SSL_CONF_CTX_set1_prefix(SSL_CONF_CTX *cctx, const char *prefix);
like that's the whole signature. two args, one return. she's lowkey simple and that's the vibe π
π¦ DESCRIPTION π¦
So SSL_CONF_CTX_set1_prefix() takes your cctx and sets its command prefix to whatever you pass in as prefix.
And if prefix is NULL? Not a problem, bestie β it just gets restored to the default value. Reset era β¨
π NOTES π
okay this is the part that actually matters so listen up π
Command prefixes alter the commands recognised by subsequent SSL_CONF_cmd() calls. Like, it literally changes what the parser is even looking for.
Example time, for files: if the prefix "SSL" is set, then command names like "SSLProtocol", "SSLOptions" etc. get recognised β instead of "Protocol" and "Options". See how the prefix just glues itself on the front? iconic.
Similarly, for command lines: if the prefix is "--ssl-", then "--ssl-no_tls1_2" is recognised instead of "-no_tls1_2". yeah. the prefix is doing all the heavy lifting π§
Now here's the spicy bit, pay attention: if theSSL_CONF_FLAG_CMDLINEflag is set, then prefix checks are case sensitive and"-"is the default.
And in the unlikely event (their words, not mine, it says "unlikely even", which is a typo in the original but we love her anyway π) that an application explicitly wants to set no prefix at all, it must be explicitly set to "". You cannot just leave it, bestie. You gotta SAY it. Empty string, out loud, on purpose. periodt.
If the SSL_CONF_FLAG_FILE flag is set, then prefix checks are case insensitive and no prefix is the default. Different flag, different rules, that's just how she is π
β RETURN VALUES β
SSL_CONF_CTX_set1_prefix() returns 1 for success and 0 for failure.
one or zero. slay or flop. that's it, that's the whole system π
π₯ SEE ALSO π₯
ssl(7)SSL_CONF_CTX_new(3)SSL_CONF_CTX_set_flags(3)SSL_CONF_CTX_set_ssl_ctx(3)SSL_CONF_cmd(3)SSL_CONF_cmd_argv(3)
go read those next, iykyk π
π HISTORY π
These functions were added in OpenSSL 1.0.2. ancient. vintage. a classic π
π COPYRIGHT π
Copyright 2012-2016 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
fr fr read the license, it's not optional bestie π
and that's the whole page!! this was OpenSSL 3.5.9, dated 2026-09-29, filed under SSL_CONF_CTX_SET1_PREFIX(3ossl). mwah, go set some prefixes, you're gonna do great π«Άβ¨π
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms