MINOR: ssl: reach a ckch_store from a sni_ctx
It was only possible to go down from the ckch_store to the sni_ctx but
not to go up from the sni_ctx to the ckch_store.
To allow that, 2 pointers were added:
- a ckch_inst pointer in the struct sni_ctx
- a ckckh_store pointer in the struct ckch_inst
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index 86894cb..df15b77 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -2949,6 +2949,7 @@
sc->neg = neg;
sc->wild = wild;
sc->name.node.leaf_p = NULL;
+ sc->ckch_inst = ckch_inst;
LIST_ADDQ(&ckch_inst->sni_ctx, &sc->by_ckch_inst);
}
return order;
@@ -4186,6 +4187,7 @@
ckch_inst->bind_conf = bind_conf;
ckch_inst->ssl_conf = ssl_conf;
+ ckch_inst->ckch_store = ckchs;
end:
if (names)
@@ -4374,6 +4376,7 @@
/* everything succeed, the ckch instance can be used */
ckch_inst->bind_conf = bind_conf;
ckch_inst->ssl_conf = ssl_conf;
+ ckch_inst->ckch_store = ckchs;
*ckchi = ckch_inst;
return errcode;