diff options
Diffstat (limited to 'freebsd/crypto/openssl/apps/s_client.c')
-rw-r--r-- | freebsd/crypto/openssl/apps/s_client.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/freebsd/crypto/openssl/apps/s_client.c b/freebsd/crypto/openssl/apps/s_client.c index 2c08d94d..40512c5e 100644 --- a/freebsd/crypto/openssl/apps/s_client.c +++ b/freebsd/crypto/openssl/apps/s_client.c @@ -1,4 +1,8 @@ #include <machine/rtems-bsd-user-space.h> +#ifdef __rtems__ +#include <machine/rtems-bsd-program.h> +#include "rtems-bsd-openssl-namespace.h" +#endif /* __rtems__ */ /* * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. @@ -503,9 +507,23 @@ struct tlsa_field { ossl_ssize_t (*parser)(const char **, void *); }; +#ifdef __rtems__ +static uint8_t usage; +static uint8_t selector; +static uint8_t mtype; +static unsigned char *data; +static struct tlsa_field tlsa_fields[] = { + { &usage, "usage", checked_uint8 }, + { &selector, "selector", checked_uint8 }, + { &mtype, "mtype", checked_uint8 }, + { &data, "data", hexdecode }, + { NULL, } +}; +#endif /* __rtems__ */ static int tlsa_import_rr(SSL *con, const char *rrdata) { /* Not necessary to re-init these values; the "parsers" do that. */ +#ifndef __rtems__ static uint8_t usage; static uint8_t selector; static uint8_t mtype; @@ -517,6 +535,7 @@ static int tlsa_import_rr(SSL *con, const char *rrdata) { &data, "data", hexdecode }, { NULL, } }; +#endif /* __rtems__ */ struct tlsa_field *f; int ret; const char *cp = rrdata; @@ -2615,6 +2634,9 @@ int s_client_main(int argc, char **argv) case PROTO_LDAP: { /* StartTLS Operation according to RFC 4511 */ +#ifdef __rtems__ + const +#endif /* __rtems__ */ static char ldap_tls_genconf[] = "asn1=SEQUENCE:LDAPMessage\n" "[LDAPMessage]\n" "messageID=INTEGER:1\n" @@ -2931,6 +2953,9 @@ int s_client_main(int argc, char **argv) } else if (ssl_pending || FD_ISSET(SSL_get_fd(con), &readfds)) { #ifdef RENEG { +#ifdef __rtems__ +#error FIXME: Make a global static variable out of this. +#endif /* __rtems__ */ static int iiii; if (++iiii == 52) { SSL_renegotiate(con); @@ -3462,3 +3487,6 @@ static int ldap_ExtendedResponse_parse(const char *buf, long rem) } #endif /* OPENSSL_NO_SOCK */ +#ifdef __rtems__ +#include "rtems-bsd-openssl-s_client-data.h" +#endif /* __rtems__ */ |