From 323a21ddeb6ae641222f77a3e5716b9060ff0883 Mon Sep 17 00:00:00 2001 From: reyk Date: Mon, 21 Apr 2014 17:22:06 +0000 Subject: [PATCH] Use RSA_set_ex_data()/RSA_get_ex_data() directly instead of the undocumented RSA_set_app_data()/RSA_get_app_data() wrappers. --- usr.sbin/relayd/ca.c | 4 ++-- usr.sbin/relayd/ssl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/relayd/ca.c b/usr.sbin/relayd/ca.c index 2b0cbb390bc..48a7c4de312 100644 --- a/usr.sbin/relayd/ca.c +++ b/usr.sbin/relayd/ca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ca.c,v 1.5 2014/04/21 16:08:47 reyk Exp $ */ +/* $OpenBSD: ca.c,v 1.6 2014/04/21 17:22:06 reyk Exp $ */ /* * Copyright (c) 2014 Reyk Floeter @@ -251,7 +251,7 @@ rsae_send_imsg(int flen, const u_char *from, u_char *to, RSA *rsa, int n, done = 0, cnt = 0; u_char *toptr; - if ((id = RSA_get_app_data(rsa)) == NULL) + if ((id = RSA_get_ex_data(rsa, 0)) == NULL) return (0); iev = proc_iev(env->sc_ps, PROC_CA, proc_id); diff --git a/usr.sbin/relayd/ssl.c b/usr.sbin/relayd/ssl.c index 33bf43f26a1..35c78b0947b 100644 --- a/usr.sbin/relayd/ssl.c +++ b/usr.sbin/relayd/ssl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl.c,v 1.20 2014/04/18 13:55:26 reyk Exp $ */ +/* $OpenBSD: ssl.c,v 1.21 2014/04/21 17:22:06 reyk Exp $ */ /* * Copyright (c) 2007 - 2014 Reyk Floeter @@ -456,7 +456,7 @@ ssl_ctx_fake_private_key(SSL_CTX *ctx, void *data, char *buf, off_t len, goto fail; } - RSA_set_app_data(rsa, data); + RSA_set_ex_data(rsa, 0, data); /* * Use the public key as the "private" key - the secret key -- 2.20.1