certnanny / sscep

SSCEP is a command line client for the SCEP protocol
Other
175 stars 92 forks source link

sscep fails to build with modern openssl (asn1_mac) #63

Closed paultag closed 4 years ago

paultag commented 7 years ago

It seems like the file asn1_mac isn't used anymore:

OpenSSL: OpenSSL 1.1.0c GCC: 6.2.1 20161124

[paultag@nyx:~/dev/local/sscep][07:25 PM] ♥  git branch
* develop
  master
[paultag@nyx:~/dev/local/sscep][07:25 PM] ♥  make
gcc -Wall -O  -I ../openssl/include    -c -o sscep.o sscep.c
In file included from sscep.h:64:0,
                 from sscep.c:11:
/usr/include/openssl/asn1_mac.h:10:2: error: #error "This file is obsolete; please update your software."
 #error "This file is obsolete; please update your software."
  ^~~~~
sscep.c: In function ‘main’:
sscep.c:612:27: warning: passing argument 2 of ‘PEM_write_X509’ from incompatible pointer type [-Wincompatible-pointer-types]
    if (PEM_write_X509(fp, c_char) != 1) {
                           ^~~~~~
In file included from sscep.h:60:0,
                 from sscep.c:11:
/usr/include/openssl/pem.h:331:1: note: expected ‘X509 * {aka struct x509_st *}’ but argument is of type ‘char *’
 DECLARE_PEM_rw(X509, X509)
 ^
sscep.c:688:27: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
      scep_t.reply_payload = reply.payload;
                           ^
sscep.c:79:8: warning: variable ‘p7’ set but not used [-Wunused-but-set-variable]
  PKCS7 p7;
        ^~
<builtin>: recipe for target 'sscep.o' failed
make: *** [sscep.o] Error 1
tedescn commented 7 years ago

@paultag,

I've experienced the same issue.

I'm sure you also know by now that OpenSSL 1.0.2j will get you past this issue and should get you working.

Regards Nigel Tedeschi

mans0954 commented 7 years ago

On upcoming versions of Debian/Ubuntu, install libssl1.0-dev rather than libssl-dev. (OpenSSL 1.0.2 is the Long Term Support (LTS) version - support will be provided until 31st December 2019.)

tscherf commented 7 years ago

I've used compat openssl102 to build current Fedora packages. Midterm I'd also like to see sscep ported to newer OpenSSL API.

gotthardp commented 4 years ago

The deprecated asn1_mac isn't used since v0.7.0 (984a802774c5ddd3059124ae8b0834c2b65c5e04).