Commit Graph

28242 Commits

Author SHA1 Message Date
Nicolas Williams
ec2204f435 Use volatile to keep ct_memcmp() ct 2016-02-16 20:49:29 -06:00
Luke Howard
33ce593b6d gss_wrap/gss_unwrap_aead implementation
Signed-off-by: Nicolas Williams <nico@twosigma.com>
2016-02-05 18:01:15 -06:00
Brian May
6b5933337b Fix parallel build
Fix problem due to missing makefile dependency on a generated file.

See http://bugs.debian.org/800728 for details

Signed-off-by: Nicolas Williams <nico@twosigma.com>
2016-02-05 17:23:39 -06:00
Stefan Metzmacher
7cd40a6105 lib/krb5: allow predefined PAC_{LOGON_NAME,PRIVSVR_CHECKSUM,SERVER_CHECKSUM} elements in _krb5_pac_sign()
A caller may want to specify an explicit order of PAC elements,
e.g. the PAC_UPN_DNS_INFO element should be placed after the PAC_LOGON_NAME
element.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2016-02-02 15:31:18 +01:00
Nicolas Williams
1830d8c876 Appveyor: get past package manifest validation
This is just a hack to get Appveyor builds to complete successfully.
Eventually we should get packages and installers to build correctly, and
even for x86 and x86_64 combined.  But it's early days and this is
useful enough.
2016-01-21 12:43:31 -06:00
Nicolas Williams
a5f13331af Appveyor: workaround perl texinfo 2016-01-21 12:43:31 -06:00
Nicolas Williams
cfd51be7fe Add appveyor.yml for Windows CI via Appveyor
Appveyor is like Travis-CI, but for Windows.

Since it seems impossible to install texinfo, this elides building docs
for now.
2016-01-21 12:43:31 -06:00
Nicolas Williams
1575f4f69a KDC: Don't confuse master process with master 2016-01-21 12:43:31 -06:00
Nicolas Williams
a6e36356b5 KDC: fix C-style 2016-01-21 12:43:30 -06:00
Nicolas Williams
4f87d85d65 Fix Windows build: no fork for kdc 2016-01-20 15:03:30 -06:00
Nicolas Williams
971ccce043 Detect fork et al for kdc 2016-01-20 11:34:41 -06:00
Nicolas Williams
78343d0907 Fix Windows tests: add missing hcrypto export 2016-01-20 11:34:41 -06:00
Nicolas Williams
62f797ed4e Fix Windows build (inc. roken.h before assert.h)
The build was failing at lib/hcrypto/evp-pkcs11.c because roken.h was
being included after <assert.h>.  It's not clear why that would be a
problem.

Here are some of the errors and warnings that resulted from including
<roken.h> after <assert.h> in evp-pkcs11.c:

evp-pkcs11.c                                                                                                                                      C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\ws2def.h(91) : warning C4005: 'AF_IPX' : macro redefinition                           s              C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\winsock.h(460) : see previous definition of 'AF_IPX'
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\ws2def.h(124) : warning C4005: 'AF_MAX' : macro redefinition
        C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\winsock.h(479) : see previous definition of 'AF_MAX'
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\ws2def.h(168) : warning C4005: 'SO_DONTLINGER' : macro redefinition
        C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\winsock.h(402) : see previous definition of 'SO_DONTLINGER'
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\ws2def.h(212) : error C2011: 'sockaddr' : 'struct' type redefinition
        C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\winsock.h(485) : see declaration of 'sockaddr'
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\ws2def.h(390) : error C2059: syntax error : 'constant'
C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\ws2def.h(524) : warning C4005: 'IN_CLASSA' : macro redefinition
        C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\winsock.h(287) : see previous definition of 'IN_CLASSA'
2016-01-18 11:05:48 -06:00
Luke Howard
bfd72f9ed5 gssapi: correct OID for GSS_C_PEER_HAS_UPDATED_SPNEGO
restore correct OID for GSS_C_PEER_HAS_UPDATED_SPNEGO, this should have no
ABI implications, it's for internal use only. The current OID was incorrectly
copied in commit dbeeb18a, it should belong to 1.3.6.1.4.1.5322.19 which is
... enterprise(1) padl(5322) gssKrb5Extensions(19). The OID we were camping
on belongs to another party.
2015-12-16 23:26:20 +11:00
Luke Howard
f5b4ef3ed8 gssapi: plug leak in test_context IOV test 2015-12-09 19:05:11 +11:00
Luke Howard
fdf8782db2 hcrypto: PKCS#11 backend
implement a PKCS#11 backend for hcrypto. tested with Solaris 11 and
SoftHSM, this is now the default when building on Solaris.
2015-12-09 11:08:35 +11:00
Luke Howard
494b11f962 hcrypto: fix spelling mistakes in comments 2015-12-09 11:07:29 +11:00
Luke Howard
f789d8403e hx509: explicitly include ref/pkcs11.h
review comment from Nico Williams: explicitly include ref/pkcs11.h to
avoid any conflict with system PKCS#11 header
2015-12-09 11:03:48 +11:00
Luke Howard
0de138a7dc cf: define __EXTENSIONS__ on Solaris
defining __EXTENSIONS__ is necessary to build on Solaris 11
2015-12-09 11:02:28 +11:00
Luke Howard
acad7be65e base: Solaris and AIX atomic increment/exchange
Implement heim_base_atomic_XXX and heim_base_exchange_pointer
for Solaris and AIX. (AIX not tested.)
2015-12-09 11:00:11 +11:00
Luke Howard
ed3e748c75 hx509: update to newer PKCS#11 header
newer PKCS#11 reference header file, sourced from SoftHSM
2015-12-09 10:59:08 +11:00
Luke Howard
54e6dbed29 libedit: Solaris portability fixes
__sun braced curses prototypes no longer compile on Solaris, remove them
2015-12-09 10:57:41 +11:00
Luke Howard
d135020e8f kdc: Fix compile error on OS X
bonjour_kid() was missing the krb5_context parameter name, preventing
compilation on Darwin (where __APPLE__ is defined)
2015-12-09 10:46:38 +11:00
Luke Howard
9aeb08173a add CommonCrypto SHA-384/512 to test_bulk 2015-12-05 00:05:49 +11:00
Luke Howard
87c59d1db2 export CommonCrypto SHA-384/512 implementations 2015-12-05 00:04:24 +11:00
Luke Howard
5ae1ab038c Merge pull request #121 from heimdal/lukeh/cfb8
Merging support for CFB8 in CommonCrypto (note will break support for OS X older than 10.7). CommonCrypto support for SHA-256/384 also added.
2015-12-04 23:59:48 +11:00
Luke Howard
4f9cc8feea add CommonCrypto support for SHA-384 and SHA-512 2015-12-04 23:56:12 +11:00
Luke Howard
93725f01f0 Fix broken CFB8 implementation, use CC for CFB8 2015-12-04 23:49:23 +11:00
Nicolas Williams
2cac8ca703 Use pthread_once() when available 2015-11-30 14:15:47 -06:00
Luke Howard
9e359ac98f base: Windows heim_base_once_t cleanup
heim_base_once_t can just be a LONG on Windows, the structure is not needed
2015-11-30 17:34:32 +11:00
Nicolas Williams
cc0e92a3c3 base: correct Windows heim_base_once_f semantics
As implemented by Jeffrey Altman heim_base_once_f() is a variant of the
"double-checked gate lock pattern".   Full memory barriers must be used
when determining whether or not to call SwitchToThread().

Change-Id: I2f8446a56c50a37c921d6e993433c9a3f7488f50
2015-11-30 00:47:54 -05:00
Jeffrey Altman
4735faba59 base: Windows implementation of heim_base_once
Provide a Windows implementation of heim_base_once that relies upon
InterlockedCompareExchange() and SwitchToThread().

Change-Id: I9cdbda796d1a27fe1e17be63f287b10132858d7f
2015-11-29 12:15:10 -05:00
Jeffrey Altman
6fbe672451 hcrypto: Default to CommonCrypto on Apple OSes
When __APPLE__ is defined and HCRYPTO_DEF_PROVIDER is not defined,
define HCRYPTO_DEF_PROVIDER to be "cc" so that Apple's CommonCrypto
implementations are used instead of the built-in "hcrypto"
implementations.

Change-Id: I393e5fc3f6c3b9339c96db58d926ff8ea1867cbb
2015-11-24 09:48:44 -05:00
Roland C. Dowdeswell
3e6fffed60 include/Makefile.am: don't clean files that are distributed.
We stop cleaning crypto-headers.h and heim_threads.h.
2015-11-06 17:06:26 -05:00
Roland C. Dowdeswell
352a7e94a3 Make the KDC use a multi-process model.
We now fork(2) a number of separate KDC processes rather than a single
process.  By default, the number is selected by asking how many CPUs
the machine has.  We also have a master process which monitors all
of the children (which do the actual work) and it will restart kids
who die for any reason.  The children will die when the parent dies.

In the case of MacOS X, we also move the bonjour code into another
separate child as it creates threads and this is known to play
rather poorly with fork(2).  We could move this logic into a
designated child at some point in the future.

We slow down the spawning to one every 25ms to prevent instant crashes
and restarts from consuming all available system time.  This approach
may want to be revisited in the future.
2015-11-06 15:39:30 -05:00
Love Hörnquist Åstrand
3544bbc0b3 Update ack.texi 2015-10-06 17:26:27 +02:00
Love Hörnquist Åstrand
c9f05de561 Merge pull request #142 from hasufell/master
Completely remove RAND_egd support
2015-10-06 17:25:17 +02:00
hasufell
427a60057c Completely remove RAND_egd support
The EGD daemon is completely unmaintained and has not seen a release
since 13 years which is not an acceptable timeframe for cryptographic
software. It is not packaged in any linux distribution I know of
and definitely not in *BSD.

LibreSSL has already dropped support for RAND_egd.
2015-10-06 15:44:47 +02:00
Love Hörnquist Åstrand
434020567a Update copyright.texi
Add Timothy
2015-09-28 10:52:47 +02:00
Love Hörnquist Åstrand
7c86e09dd8 Update ack.texi
Add Timothy
2015-09-28 10:50:38 +02:00
Love Hörnquist Åstrand
8a906db068 Merge pull request #141 from madscientist159/master
Add ability to store extended principal attributes in LDAP
2015-09-28 10:49:13 +02:00
Timothy Pearson
f5f76ee72c Add ability to store extended principal attributes in LDAP
A careful code review was undertaken, and it was determined
that the best way to store the extended attributes was in a
native ASN1 encoded field.  LDAP does not understand the
SEQUENCE of SEQUENCE structures used extensively throughout
the extended attributes structure, and there was already a
precedent set for storing the krb5Key data in a native ASN1
encoded field.
2015-09-27 16:36:24 -05:00
Love Hörnquist Åstrand
bb14c02e12 Merge pull request #140 from madscientist159/master
Add ability to specifiy PKCS#11 slot number when using hx509
2015-09-25 00:47:01 +02:00
Timothy Pearson
042b1ee7cb Do not crash if private key not found 2015-09-24 15:48:14 -05:00
Timothy Pearson
1d07f08351 Add ability to specifiy PKCS#11 slot number when using hx509
Example usage: kinit -C PKCS11:/usr/lib/opensc-pkcs11.so,slot=3 foo@BAR.TLD
2015-09-24 15:34:51 -05:00
Jeffrey Altman
c81572ab5d Windows: Remove *_PA_ClientCanon* from export list
Change 29f6290fe6 removed the
PA_ClientCanon* ASN.1 functionality but failed to remove the generated
symbols from the Windows export list.

Change-Id: I9a46532ed7d8612fbc597dec9848505d4b440e09
2015-09-13 20:34:41 -04:00
Love Hörnquist Åstrand
0a5de96d72 Merge pull request #134 from abartlet/allow-null-authenticator
gssapi: Allow a NULL authenticator
2015-08-03 20:18:16 +02:00
Andrew Bartlett
411da1fb31 Merge pull request #138 from abartlet/lorikeet-heimdal-for-upstream
Samba Cross-realm support patches from metze

These patches were posted to heimdal-discuss by metze, and there were no objections there.
2015-07-31 18:03:07 +12:00
Stefan Metzmacher
ad3acc2aef lib/gssapi/krb5: implement gss_[un]wrap_iov[_length] with arcfour-hmac-md5
Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
2015-07-31 17:30:23 +12:00
Stefan Metzmacher
bafefad87f lib/gssapi/krb5: split out a arcfour_mic_cksum_iov() function
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2015-07-31 17:30:23 +12:00