Skip to content

Commit f8a6e5b

Browse files
authored
Merge pull request #97 from lubical/patch-1
Update estserver.c
2 parents 43116f6 + 0721a15 commit f8a6e5b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

example/server/estserver.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@
2020
#ifndef DISABLE_TSEARCH
2121
#include <search.h>
2222
#endif
23+
#ifdef WIN32
24+
#include "../windows_util/getopt.h"
25+
#include <windows.h>
26+
#else
2327
#include <getopt.h>
28+
#endif
2429
#include <openssl/err.h>
2530
#include <openssl/engine.h>
2631
#include <openssl/conf.h>
@@ -572,7 +577,11 @@ static int lookup_pkcs10_request(unsigned char *pkcs10, int p10_len)
572577
* would do this lookup. But this should be good enough for
573578
* testing the retry-after logic.
574579
*/
580+
#ifdef HAVE_OLD_OPENSSL
575581
pkey = X509_PUBKEY_get(req->req_info->pubkey);
582+
#else
583+
pkey = X509_PUBKEY_get(X509_REQ_get_X509_PUBKEY(req));
584+
#endif
576585
if (!pkey) {
577586
rv = 1;
578587
goto DONE;

0 commit comments

Comments
 (0)