Index: branches/2018Q4/security/pam_p11/pkg-plist =================================================================== --- branches/2018Q4/security/pam_p11/pkg-plist (revision 485592) +++ branches/2018Q4/security/pam_p11/pkg-plist (nonexistent) @@ -1,2 +0,0 @@ -lib/security/pam_p11_opensc.so -lib/security/pam_p11_openssh.so Property changes on: branches/2018Q4/security/pam_p11/pkg-plist ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2018Q4/security/pam_p11/Makefile =================================================================== --- branches/2018Q4/security/pam_p11/Makefile (revision 485592) +++ branches/2018Q4/security/pam_p11/Makefile (revision 485593) @@ -1,33 +1,39 @@ # Created by: Alex Dupre # $FreeBSD$ PORTNAME= pam_p11 -PORTVERSION= 0.1.5 -PORTREVISION= 3 +PORTVERSION= 0.2.0 +PORTREVISION= 1 CATEGORIES= security -MASTER_SITES= SF/opensc/${PORTNAME} +MASTER_SITES= https://github.com/OpenSC/pam_p11/releases/download/pam_p11-${PORTVERSION}/ MAINTAINER= ale@FreeBSD.org COMMENT= PAM module using crypto tokens for auth LICENSE= LGPL21 LIB_DEPENDS= libp11.so:security/libp11 -OPTIONS_DEFINE= DOCS +USES= libtool pkgconfig ssl autoreconf +OPTIONS_DEFINE= DOCS NLS + GNU_CONFIGURE= yes -USES= libtool pkgconfig ssl +NLS_CONFIGURE_ENABLE= nls +NLS_USES= gettext +NLS_PLIST_FILES=share/locale/de/LC_MESSAGES/pam_p11.mo + +CONFIGURE_ARGS= --with-libintl-prefix=${LOCALBASE} + CONFIGURE_ENV= OPENSSL_CFLAGS="-I${OPENSSLINC}" \ - OPENSSL_LIBS="-L${OPENSSLLIB} -lssl" + OPENSSL_LIBS="-L${OPENSSLLIB} -lcrypto" +PLIST_FILES= lib/security/pam_p11.so + PORTDOCS= * post-install: - @${MKDIR} ${STAGEDIR}${DOCSDIR}/wiki - @(cd ${WRKSRC} && ${CP} NEWS ${STAGEDIR}${DOCSDIR}) - @(cd ${WRKSRC}/doc && ${CP} README ${STAGEDIR}${DOCSDIR}) - @(cd ${WRKSRC}/doc && ${CP} *.css *.html ${STAGEDIR}${DOCSDIR}/wiki) + ${INSTALL_DATA} ${WRKSRC}/NEWS ${STAGEDIR}${DOCSDIR} .include Index: branches/2018Q4/security/pam_p11/distinfo =================================================================== --- branches/2018Q4/security/pam_p11/distinfo (revision 485592) +++ branches/2018Q4/security/pam_p11/distinfo (revision 485593) @@ -1,2 +1,3 @@ -SHA256 (pam_p11-0.1.5.tar.gz) = 74da875467c4ba156f7cb7eaec0718f92dded03f40db3c6c0423c03f44d9f25a -SIZE (pam_p11-0.1.5.tar.gz) = 348181 +TIMESTAMP = 1539433560 +SHA256 (pam_p11-0.2.0.tar.gz) = 088d4c05d23fee9535f1b16f6c993c88b11cbed0288d5a1d0b37da2f390325a2 +SIZE (pam_p11-0.2.0.tar.gz) = 417550 Index: branches/2018Q4/security/pam_p11/files/patch-configure =================================================================== --- branches/2018Q4/security/pam_p11/files/patch-configure (revision 485592) +++ branches/2018Q4/security/pam_p11/files/patch-configure (nonexistent) @@ -1,20 +0,0 @@ ---- configure.orig Thu Jun 1 15:05:28 2006 -+++ configure Thu Jun 1 15:07:47 2006 -@@ -20823,7 +20823,7 @@ - (exit $ac_status); }; then - pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null` - else -- pkg_failed=yes -+ pkg_cv_OPENSSL_CFLAGS=$ac_cv_env_OPENSSL_CFLAGS_value - fi - else - pkg_failed=untried -@@ -20837,7 +20837,7 @@ - (exit $ac_status); }; then - pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null` - else -- pkg_failed=yes -+ pkg_cv_OPENSSL_LIBS=$ac_cv_env_OPENSSL_LIBS_value - fi - else - pkg_failed=untried Property changes on: branches/2018Q4/security/pam_p11/files/patch-configure ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2018Q4/security/pam_p11/files/patch-src_pam_p11.c =================================================================== --- branches/2018Q4/security/pam_p11/files/patch-src_pam_p11.c (revision 485592) +++ branches/2018Q4/security/pam_p11/files/patch-src_pam_p11.c (nonexistent) @@ -1,11 +0,0 @@ ---- src/pam_p11.c.orig Sun Jun 11 21:16:46 2006 -+++ src/pam_p11.c Sun Jun 11 21:17:53 2006 -@@ -39,7 +39,7 @@ - #define LOGNAME "pam_p11" /* name for log-file entries */ - - #define RANDOM_SOURCE "/dev/urandom" --#define RANDOM_SIZE 128 -+#define RANDOM_SIZE 20 - #define MAX_SIGSIZE 256 - - extern int match_user(X509 * x509, const char *login); Property changes on: branches/2018Q4/security/pam_p11/files/patch-src_pam_p11.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2018Q4/security/pam_p11/files/patch-configure.ac =================================================================== --- branches/2018Q4/security/pam_p11/files/patch-configure.ac (nonexistent) +++ branches/2018Q4/security/pam_p11/files/patch-configure.ac (revision 485593) @@ -0,0 +1,14 @@ +--- configure.ac.orig 2018-10-24 11:06:32 UTC ++++ configure.ac +@@ -85,6 +85,11 @@ PKG_CHECK_MODULES( + )] + ) + ++saved_LIBS="$LIBS" ++LIBS="$OPENSSL_LIBS $LIBS" ++AC_CHECK_FUNCS(EVP_MD_CTX_new EVP_MD_CTX_free EVP_MD_CTX_reset) ++LIBS="$saved_LIBS" ++ + if test -z "${PAM_LIBS}"; then + AC_ARG_VAR([PAM_CFLAGS], [C compiler flags for pam]) + AC_ARG_VAR([PAM_LIBS], [linker flags for pam]) Property changes on: branches/2018Q4/security/pam_p11/files/patch-configure.ac ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q4/security/pam_p11/files/patch-src_Makefile.am =================================================================== --- branches/2018Q4/security/pam_p11/files/patch-src_Makefile.am (nonexistent) +++ branches/2018Q4/security/pam_p11/files/patch-src_Makefile.am (revision 485593) @@ -0,0 +1,16 @@ +--- src/Makefile.am.orig 2018-10-24 12:39:40 UTC ++++ src/Makefile.am +@@ -14,11 +14,11 @@ pam_p11_la_SOURCES = pam_p11.c base64.c + noinst_PROGRAMS = test-login test-passwd + + test_login_SOURCES = test.c login.c $(pam_p11_la_SOURCES) +-test_login_LDADD = -lpam_misc ++test_login_LDADD = ${INTLLIBS} + test_login_CFLAGS = $(AM_CFLAGS) -DLIBDIR=\"$(libdir)\" -DTEST + + test_passwd_SOURCES = test.c passwd.c $(pam_p11_la_SOURCES) +-test_passwd_LDADD = -lpam_misc ++test_passwd_LDADD = ${INTLLIBS} + test_passwd_CFLAGS = $(AM_CFLAGS) -DLIBDIR=\"$(libdir)\" -DTEST + + format: Property changes on: branches/2018Q4/security/pam_p11/files/patch-src_Makefile.am ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q4/security/pam_p11/files/patch-src_pam__p11.c =================================================================== --- branches/2018Q4/security/pam_p11/files/patch-src_pam__p11.c (nonexistent) +++ branches/2018Q4/security/pam_p11/files/patch-src_pam__p11.c (revision 485593) @@ -0,0 +1,65 @@ +--- src/pam_p11.c.orig 2018-05-04 14:52:04 UTC ++++ src/pam_p11.c +@@ -31,6 +31,17 @@ + #include + #include + ++/* openssl deprecated API emulation */ ++#ifndef HAVE_EVP_MD_CTX_NEW ++#define EVP_MD_CTX_new() EVP_MD_CTX_create() ++#endif ++#ifndef HAVE_EVP_MD_CTX_FREE ++#define EVP_MD_CTX_free(ctx) EVP_MD_CTX_destroy((ctx)) ++#endif ++#ifndef HAVE_EVP_MD_CTX_RESET ++#define EVP_MD_CTX_reset(ctx) EVP_MD_CTX_cleanup((ctx)) ++#endif ++ + #ifdef ENABLE_NLS + #include + #include +@@ -53,7 +64,7 @@ + #include + #else + #define pam_syslog(handle, level, msg...) syslog(level, ## msg) +-static int pam_vprompt(pam_handle_t *pamh, int style, char **response, ++int pam_vprompt(const pam_handle_t *pamh, int style, char **response, + const char *fmt, va_list args) + { + int r = PAM_CRED_INSUFFICIENT; +@@ -549,7 +560,7 @@ static int key_find(pam_handle_t *pamh, + return 0; + } + +-static int randomize(pam_handle_t *pamh, unsigned char *r, unsigned int r_len) ++static int randomize(pam_handle_t *pamh, unsigned char *r, int r_len) + { + int ok = 0; + int fd = open("/dev/urandom", O_RDONLY); +@@ -572,7 +583,7 @@ static int key_verify(pam_handle_t *pamh + unsigned char signature[256]; + unsigned int siglen = sizeof signature; + const EVP_MD *md = EVP_sha1(); +- EVP_MD_CTX *md_ctx = EVP_MD_CTX_create(); ++ EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); + EVP_PKEY *privkey = PKCS11_get_private_key(authkey); + EVP_PKEY *pubkey = PKCS11_get_public_key(authkey); + +@@ -590,7 +601,7 @@ static int key_verify(pam_handle_t *pamh + || !EVP_SignInit(md_ctx, md) + || !EVP_SignUpdate(md_ctx, challenge, sizeof challenge) + || !EVP_SignFinal(md_ctx, signature, &siglen, privkey) +- || !EVP_MD_CTX_cleanup(md_ctx) ++ || !EVP_MD_CTX_reset(md_ctx) + || !EVP_VerifyInit(md_ctx, md) + || !EVP_VerifyUpdate(md_ctx, challenge, sizeof challenge) + || 1 != EVP_VerifyFinal(md_ctx, signature, siglen, pubkey)) { +@@ -607,7 +618,7 @@ err: + if (NULL != privkey) + EVP_PKEY_free(privkey); + if (NULL != md_ctx) { +- EVP_MD_CTX_destroy(md_ctx); ++ EVP_MD_CTX_free(md_ctx); + } + return ok; + } Property changes on: branches/2018Q4/security/pam_p11/files/patch-src_pam__p11.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q4/security/pam_p11/files/patch-src_test.c =================================================================== --- branches/2018Q4/security/pam_p11/files/patch-src_test.c (revision 485592) +++ branches/2018Q4/security/pam_p11/files/patch-src_test.c (revision 485593) @@ -1,10 +1,23 @@ ---- src/test.c.orig 2008-08-26 12:37:37.000000000 +0200 -+++ src/test.c 2008-08-26 12:37:45.000000000 +0200 -@@ -2,7 +2,6 @@ +--- src/test.c.orig 2018-05-04 14:52:04 UTC ++++ src/test.c +@@ -22,9 +22,10 @@ + + #include #include ++#include ++#include #include -#include #include - int main(int argc, char **argv) + #ifndef LIBDIR +@@ -42,7 +43,7 @@ int main(int argc, const char **argv) + }; + pam_handle_t *pamh = NULL; + struct pam_conv conv = { +- misc_conv, ++ openpam_ttyconv, + NULL, + }; + int r; Index: branches/2018Q4/security/pam_p11/pkg-descr =================================================================== --- branches/2018Q4/security/pam_p11/pkg-descr (revision 485592) +++ branches/2018Q4/security/pam_p11/pkg-descr (revision 485593) @@ -1,21 +1,21 @@ Pam_p11 is a plugable authentication module (pam) package for using crpytographic tokens such as smart cards and usb crypto tokens for authentication. Pam_p11 uses libp11 to access any PKCS#11 module. It should be compatible with any implementation, but it is primarely developed using OpenSC. Pam_p11 implements two authentication modules: * pam_p11_openssh authenticates the user using his openssh ~/.ssh/authorized_keys file. * pam_p11_opensc authenticates the user using certificates found in ~/.eid/authorized_certificates. Pam_p11 is very simple, it has no config file, no options other than the PKCS#11 module file, does not know about certificate chains, certificate authorities, revocation lists or OCSP. Perfect for the small installation with no frills. -WWW: https://github.com/OpenSC/OpenSC/wiki/pam_p11-simple-RSA-authentication-with-PKCS%2311-modules +WWW: https://github.com/OpenSC/pam_p11 Index: branches/2018Q4 =================================================================== --- branches/2018Q4 (revision 485592) +++ branches/2018Q4 (revision 485593) Property changes on: branches/2018Q4 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r482217,482333,482904