Tobias Brunner
381f6d982c
kernel-pfkey: Fix extended replay configuration on FreeBSD 11.1
...
Fixes: 88a8fba1c7 ("kernel-pfkey: Support anti-replay windows > 2k")
Fixes #2501 .
2017-12-22 10:19:49 +01:00
Tobias Brunner
6d98bb926e
swanctl: Allow dots in authority/shared secret/pool names
...
Use argument evaluation provided by settings_t instead of using strings
to enumerate key/values.
If section names contain dots the latter causes the names to get split
and interpreted as non-existing sections and subsections.
This currently doesn't work for connections and their subsections due to
the recursion.
2017-12-22 10:11:21 +01:00
Tobias Brunner
a7f613ca2e
vici: Document NTLM secrets in README.md
...
Fixes #2481 .
2017-12-22 10:09:26 +01:00
Tobias Brunner
859d645c44
vici: Accept XAUTH as shared key type too
...
Fixes #2481 .
2017-12-22 10:09:22 +01:00
Tobias Brunner
fd9edf7f31
travis: Disable warning that causes a false positive in Xcode 8.3+
...
Xcode 8.3, to which there recently was a switch, spits out a warning for
the potentially unaligned access to ip6_plen in ip-packet.c, which we
explicitly read via untoh16() hence the access to that pointer is not
actually unaligned. It seems the compiler is not able to determine that
there is no unaligned access even though the function is defined in the
header and marked inline.
2017-12-20 16:08:21 +01:00
Tobias Brunner
0729be1bfe
Merge branch 'android-proposals'
...
Makes IKE and ESP proposals configurable.
2017-11-28 16:23:41 +01:00
Tobias Brunner
4a79434b11
android: Remove modp1024 from the ESP proposals
2017-11-28 16:19:08 +01:00
Tobias Brunner
8517a0edb4
testing: Explicitly deliver all test results as text/plain
2017-11-28 16:17:50 +01:00
Tobias Brunner
5a6f687bdf
android: New release after adding configurable proposals
2017-11-17 18:11:43 +01:00
Tobias Brunner
b03713add4
android: Validate proposal strings when importing profiles
2017-11-17 18:11:43 +01:00
Tobias Brunner
9f962f6c19
android: Validate proposal strings in the GUI
2017-11-17 18:11:43 +01:00
Tobias Brunner
836a943804
android: Add utility JNI function to validate proposal strings
2017-11-17 18:11:39 +01:00
Tobias Brunner
2307bffe56
proposal: Move proposal_t from libcharon to libstrongswan
...
This allows us to use it without having to initialize libcharon, which
was required for the logging (we probably could have included debug.h
instead of daemon.h to workaround that but this seems more correct).
2017-11-17 18:09:54 +01:00
Tobias Brunner
92c1b52487
android: Load JNI libraries in Application class
...
This way they are also loaded when we don't use CharonVpnService.
2017-11-17 18:05:35 +01:00
Tobias Brunner
2d1f65feb3
android: Make IKE/ESP proposals configurable in the GUI
2017-11-17 18:05:35 +01:00
Tobias Brunner
6403ad5457
android: Import IKE/ESP proposals
...
We currently don't validate them here, only when used later will they
get parsed (which includes some checks).
2017-11-17 14:31:06 +01:00
Tobias Brunner
a7c43544dd
android: Use optional custom proposals for IKE and ESP
...
If the proposal is invalid we fall back to the defaults.
2017-11-17 14:31:06 +01:00
Tobias Brunner
24c22a3fa8
android: Add properties for IKE and ESP proposals
2017-11-17 14:31:06 +01:00
Tobias Brunner
8b6c23342c
android: Free settings string passed via JNI
2017-11-17 14:31:06 +01:00
Tobias Brunner
caee751d13
NEWS: Added some news for 5.6.1
2017-11-17 10:00:29 +01:00
Tobias Brunner
f7a73fe0f7
hashers: Change names of SHA2 hash algorithms
...
Keep the lower case names as they are as we use them internally (parsing
and e.g. in OpenSSL as identifier).
2017-11-17 09:32:47 +01:00
Tobias Brunner
36ae037b81
ikev2: Add hash algorithm used for RSASSA-PSS signature to log message
2017-11-17 09:30:53 +01:00
Tobias Brunner
dfd5f090fb
hasher: Add uppercase short names for hash algorithms
2017-11-17 09:30:53 +01:00
Tobias Brunner
ce4aebe00a
testing: Configure logging via syslog in strongswan.conf
...
Globally configure logging in strongswan.conf.testing and replace all
charondebug statements with strongswan.conf settings.
2017-11-15 17:24:04 +01:00
Tobias Brunner
d24d26c4bc
testing: Disable logging via journal in charon-systemd
...
This avoids duplicate log messages as we already log via syslog to get
daemon.log.
2017-11-15 17:12:09 +01:00
Tobias Brunner
be214cb17e
testing: Globally define logging via syslog for charon-systemd
...
We could make the same change for charon (actually setting it for charon
in strongswan.conf.testing would work for charon-systemd too), however,
there are dozens of test cases that currently set charondebug in
ipsec.conf.
2017-11-15 17:09:55 +01:00
Tobias Brunner
7a659c0f99
x509: Initialize signature params when parsing attribute certificates
2017-11-15 14:41:56 +01:00
Tobias Brunner
26d18f4efb
sw-collector: Unmap history file on failure to instantiate extractor
2017-11-15 14:40:10 +01:00
Tobias Brunner
42353849cb
charon: Explicitly check return value of fileno()
...
This is mainly for Coverity because fchown() can't take a negative
value, which the -1 check implies is possible.
2017-11-15 14:37:43 +01:00
Tobias Brunner
be79839ea7
pkcs8: Add explicit comment for RSASSA-PSS fall-through
2017-11-15 14:33:05 +01:00
Tobias Brunner
7f1d944bc9
The pacman tool got replaced by the sec-updater tool
2017-11-15 12:18:17 +01:00
Tobias Brunner
851e51d1cf
sec-updater: Fix typo in documentation
2017-11-15 12:10:33 +01:00
Tobias Brunner
527b3f0ca5
Fixed some typos, courtesy of codespell
2017-11-15 10:21:13 +01:00
Tobias Brunner
c87b16d256
swanctl: Add check for conflicting short options
2017-11-13 10:09:41 +01:00
Tobias Brunner
f0c7cbd1d7
swanctl: Properly register --counters commmand
...
Use C instead of c, which is already used for --load-conns.
2017-11-13 09:45:14 +01:00
Tobias Brunner
291b02262d
charon-tkm: Unlink PID file after deinit
...
Same change as for charon in the previous commit.
References #2460 .
2017-11-10 10:56:13 +01:00
Tobias Brunner
1b4d97dbb7
charon: Unlink PID file after daemon deinit (i.e. after unloading plugins etc.)
...
Make sure, though, that we only remove the file if we actually
created it (e.g. not for --help or --version). And do so before
deinitializing libstrongswan due to leak detective.
Fixes #2460 .
2017-11-10 10:55:43 +01:00
Tobias Brunner
1c4b392a5b
Merge branch 'rsassa-pss'
...
This adds support for RSASSA-PSS signatures in IKEv2 digital signature
authentication (RFC 7427), certificates and CRLs etc., and when signing
credentials via pki tool. For interoperability with older versions, the
default is to use classic PKCS#1 signatures. To use PSS padding either enable
rsa_pss via strongswan.conf or explicitly use it either via ike:rsa/pss...
auth token or the --rsa-padding option of the pki tool.
References #2427 .
2017-11-08 16:53:35 +01:00
Tobias Brunner
fde0c763b6
auth-cfg: Add RSA/PSS schemes for pubkey and rsa if enabled in strongswan.conf
...
Also document the rsa/pss prefix.
2017-11-08 16:48:10 +01:00
Tobias Brunner
27a79326c7
pki: Enable PSS padding if enabled in strongswan.conf
2017-11-08 16:48:10 +01:00
Tobias Brunner
d57af8dde0
pki: Optionally generate RSA/PSS signatures
2017-11-08 16:48:10 +01:00
Tobias Brunner
9b828ee85f
pki: Indent usage lines properly automatically
2017-11-08 16:48:10 +01:00
Tobias Brunner
364395d2de
Treat RSASSA-PSS keys like rsaEncryption RSA keys
...
In theory we should treat any parameters and the identifier itself as
restriction to only use the key to create signatures accordingly (e.g.
only use RSA with PSS padding or even use specific hash algorithms).
But that's currently tricky as we'd have to store and pass this information
along with our private keys (i.e. use PKCS#8 to store them and change the
builder calls to pass along the identifier and parameters). That would
require quite some work.
2017-11-08 16:48:10 +01:00
Tobias Brunner
fb63012e0c
openssl: Add support for signature schemes with parameters
2017-11-08 16:48:10 +01:00
Tobias Brunner
dc83bc147e
pki: Properly forward digest to attribute certificate builder
2017-11-08 16:48:10 +01:00
Tobias Brunner
bbfe39f597
x509: Add support for signature schemes with parameters
...
Also adds support for specifying the hash algorithm for attribute
certificate signatures.
2017-11-08 16:48:10 +01:00
Tobias Brunner
0c23a5693c
builder: Add builder option to pass signature scheme and params
2017-11-08 16:48:10 +01:00
Tobias Brunner
3fc66e5743
ikev2: Use helpers to build signature auth data
2017-11-08 16:48:10 +01:00
Tobias Brunner
eae80fdedc
signature-params: Add helpers to parse/build ASN.1 algorithmIdentifier for signature schemes
2017-11-08 16:48:10 +01:00
Tobias Brunner
6f97c0d50b
ikev2: Enumerate RSA/PSS schemes and use them if enabled
2017-11-08 16:48:10 +01:00
Tobias Brunner
24b2ede283
ikev2: Support signing with RSASSA-PSS via RFC 7427 signature auth
2017-11-08 16:48:10 +01:00
Tobias Brunner
a4aaef7477
signature-params: Use helper to build MGF1 algorithmIdentifier
2017-11-08 16:48:10 +01:00
Tobias Brunner
f89348d035
asn1: Add helper function to create algorithmIdentifier with parameters
2017-11-08 16:48:10 +01:00
Tobias Brunner
5f7be58177
ikev2: Verify RSASSA-PSS signatures via RFC 7427 signature auth
2017-11-08 16:48:10 +01:00
Tobias Brunner
84b1c06d0e
keymat_v2: Pass/receive signature schemes as signature_param_t objects
2017-11-08 16:48:10 +01:00
Tobias Brunner
634c6ba8ce
auth-cfg: Parse rsa/pss auth tokens
2017-11-08 16:48:10 +01:00
Tobias Brunner
54f8d09261
auth-cfg: Store signature schemes as signature_params_t objects
...
Due to circular references the hasher_from_signature_scheme() helper
does not take a signature_params_t object.
2017-11-08 16:48:10 +01:00
Tobias Brunner
024b979522
certificate: Return signature scheme and parameters from issued_by() method
...
This also required some include restructuring (avoid including library.h
in headers) to avoid unresolvable circular dependencies.
2017-11-08 16:48:10 +01:00
Tobias Brunner
c2935b03c4
signature-params: Add helper struct for signature scheme and parameters
2017-11-08 16:48:10 +01:00
Tobias Brunner
72b7c0ffd8
android: Add support for creating RSASSA-PSS signatures via JNI
2017-11-08 16:48:10 +01:00
Tobias Brunner
414f255561
unit-tests: Add RSA-PSS signature tests with specific salts
2017-11-08 16:48:10 +01:00
Tobias Brunner
37efb9787b
gcrypt: Add support for static salts when signing with RSA-PSS
2017-11-08 16:48:10 +01:00
Tobias Brunner
f241a981aa
gmp: Add support for static salts when signing with RSA-PSS
2017-11-08 16:48:10 +01:00
Tobias Brunner
c380608a89
signature-params: Optionally pass a specific salt value when signing
2017-11-08 16:48:10 +01:00
Tobias Brunner
fa7f5e2d0c
unit-tests: Warn if we skip RSA tests due to dependencies
2017-11-08 16:48:10 +01:00
Tobias Brunner
4c5dd39aa3
unit-tests: Add ability to issue a warning message for a test case
...
This way we can warn if we e.g. skipped actually doing something due to
dependencies (otherwise the test case would just appear to have succeeded).
2017-11-08 16:48:10 +01:00
Tobias Brunner
90a3bc5075
mgf1: Add support for SHA-224/384 based MGF1
2017-11-08 16:48:10 +01:00
Tobias Brunner
720a76c229
xof: Add identifiers for MGF1 XOFs based on SHA-224/384
2017-11-08 16:48:10 +01:00
Tobias Brunner
126fd8af09
gmp: Use helper to determine XOF type
2017-11-08 16:48:10 +01:00
Tobias Brunner
883e7fcd65
xof: Add helper to determine MGF1 XOF type from hash algorithm
2017-11-08 16:48:10 +01:00
Tobias Brunner
3ce8b0556a
gcrypt: Add support for RSA-PSS signatures
...
For salt lengths other than 20 this requires 0bd8137e68c2 ("cipher:
Add option to specify salt length for PSS verification."), which was
included in libgcrypt 1.7.0 (for Ubuntu requires 17.04). As that makes
it pretty much useless for us (SHA-1 is a MUST NOT), we require that version
to even provide the feature.
2017-11-08 16:48:10 +01:00
Tobias Brunner
89c3987baf
gcrypt: Register supported RSA signature/verification schemes
2017-11-08 16:48:10 +01:00
Tobias Brunner
c9a2b3b784
configure: Enable mgf1 plugin if gmp plugin is enabled
2017-11-08 16:48:10 +01:00
Tobias Brunner
7d6b81648b
gmp: Add support for RSASSA-PSS signature verification
2017-11-08 16:48:10 +01:00
Tobias Brunner
154ee7f66a
gmp: Add support for RSASSA-PSS signature creation
2017-11-08 16:48:10 +01:00
Tobias Brunner
00d161f2db
unit-tests: Add FIPS 186-4 RSASSA-PSS test vectors
...
Since not all implementations allow setting a specific salt value when
generating signatures (e.g. OpenSSL doesn't), we are often limited to
only using the test vectors with salt length of 0.
We also exclude test vectors with SHA-1, SHA-224 and SHA-384.
2017-11-08 16:48:10 +01:00
Tobias Brunner
89015dff9e
unit-tests: Create and verify some RSA PSS signatures
2017-11-08 16:48:10 +01:00
Tobias Brunner
2f95d7195d
openssl: Add support for verifying RSASSA-PSS signatures
2017-11-08 16:48:10 +01:00
Tobias Brunner
51dd2fd2db
openssl: Add support for creating RSASSA-PSS signatures
2017-11-08 16:48:10 +01:00
Tobias Brunner
5ae3f5cea8
openssl: Add helper to determine EVP_MD from hash_algorithm_t
2017-11-08 16:48:10 +01:00
Tobias Brunner
a994407d50
unit-tests: Add FIPS 186-4 RSA test vectors
...
Excluding SHA-224 and the stuff from FIPS 186-2 (SHA-1, 1024 bit keys).
2017-11-08 16:48:10 +01:00
Tobias Brunner
183a9108fb
gcrypt: Determine missing RSA private key parameters
...
We only need n, e, and d. The primes p and q and the coefficient
for the Chinese remainder algorithm can be determined from these.
2017-11-08 16:48:10 +01:00
Tobias Brunner
bd4df68a7b
gmp: Determine missing RSA private key parameters
...
We only need n, e, and d. The parameters for the Chinese remainder
algorithm and even p and q can be determined from these.
2017-11-08 16:48:10 +01:00
Tobias Brunner
03eda5a822
openssl: Add functions to determine missing RSA private key parameters
...
We only need n, e, and d. The parameters for the Chinese remainder
algorithm and even p and q can be determined from these.
2017-11-08 16:48:10 +01:00
Tobias Brunner
a22316520b
signature-params: Add functions to parse/build ASN.1 RSASSA-PSS params
2017-11-08 16:48:10 +01:00
Tobias Brunner
c2b878cd61
hasher: Add function to determine length of hashes
2017-11-08 16:48:10 +01:00
Tobias Brunner
ffd0eeecf0
asn1: Add function to generate an ASN.1 integer from an uint64_t
2017-11-08 16:48:10 +01:00
Tobias Brunner
bfe1cb3a94
asn1: Add OID for MGF1
2017-11-08 16:48:10 +01:00
Tobias Brunner
d03c5b7994
signature-params: Add struct for RSASSA-PSS parameters
2017-11-08 16:48:10 +01:00
Tobias Brunner
de280c2e03
private-key: Add optional parameters argument to sign() method
2017-11-08 16:48:10 +01:00
Tobias Brunner
a413571f3b
public-key: Add optional parameters argument to verify() method
2017-11-08 16:48:10 +01:00
Tobias Brunner
677072accc
public-key: Add RSASSA-PSS signature scheme identifier
2017-11-08 16:48:10 +01:00
Tobias Brunner
69502f5afd
asn1: Add OID for RSASSA-PSS
2017-11-08 16:48:10 +01:00
Tobias Brunner
43b59d1323
ikev2: Don't use SHA-1 for RFC 7427 signature authentication
...
RFC 8247 demoted it to MUST NOT.
References #2427 .
2017-11-08 16:47:24 +01:00
Tobias Brunner
76c58498ef
proposal: Remove MODP-1024 from default IKE proposal
...
RFC 8247 demoted it to SHOULD NOT. This might break connections with
Windows clients unless they are configured to use a stronger group or
matching weak proposals are configured explicitly on the server.
References #2427 .
2017-11-08 16:47:16 +01:00
Tobias Brunner
10da451fc3
proposal: Remove MD5 from default IKE proposal
...
RFC 8247 demoted MD5 to MUST NOT.
References #2427 .
2017-11-08 16:47:04 +01:00
Tobias Brunner
2294606aa5
proposal: Remove deprecated algorithms from default ESP and AH proposals
...
This removes algorithms that were deprecated by RFC 8221 (3DES, BF, MD5)
from the default proposals for ESP and AH.
References #8247 .
2017-11-08 16:46:51 +01:00
Tobias Brunner
0a6fbe8f7e
pool: Destroy enumerator before deleting existing pool
...
The MySQL client doesn't like overlapping queries on the same
connection, so we make sure to destroy the enumerator used to check for
an existing pool before deleting it when --replace is used.
2017-11-08 16:40:14 +01:00
Tobias Brunner
88a8fba1c7
kernel-pfkey: Support anti-replay windows > 2k
...
FreeBSD 11.1 supports a new extension to configure larger anti-replay
windows, now configured as number of packets.
Fixes #2461 .
2017-11-08 16:35:38 +01:00
Tobias Brunner
21a500a092
kernel-pfkey: Don't include keys in SADB_UPDATE message to update IPs on FreeBSD
...
The FreeBSD kernel explicitly rejects messages containing keys for mature SAs.
Fixes #2457 .
2017-11-08 16:34:12 +01:00