diff --git a/CHANGES b/CHANGES index df6e6b1a..c5545750 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,11 @@ Changes between 1.1.1 and 1.1.2 [xx XXX xxxx] + *) Remove the 'dist' target and add a tarball building script. The + 'dist' target has fallen out of use, and it shouldn't be + necessary to configure just to create a source distribution. + [Richard Levitte] + *) Recreate the OS390-Unix config target. It no longer relies on a special script like it did for OpenSSL pre-1.1.0. [Richard Levitte] @@ -55,7 +60,27 @@ list of built in objects, i.e. OIDs with names. [Richard Levitte] - Changes between 1.1.1 and 1.1.1a [xx XXX xxxx] + Changes between 1.1.1 and 1.1.1a [20 Nov 2018] + + *) Timing vulnerability in DSA signature generation + + The OpenSSL DSA signature algorithm has been shown to be vulnerable to a + timing side channel attack. An attacker could use variations in the signing + algorithm to recover the private key. + + This issue was reported to OpenSSL on 16th October 2018 by Samuel Weiser. + (CVE-2018-0734) + [Paul Dale] + + *) Timing vulnerability in ECDSA signature generation + + The OpenSSL ECDSA signature algorithm has been shown to be vulnerable to a + timing side channel attack. An attacker could use variations in the signing + algorithm to recover the private key. + + This issue was reported to OpenSSL on 25th October 2018 by Samuel Weiser. + (CVE-2018-0735) + [Paul Dale] *) Fixed the issue that RAND_add()/RAND_seed() silently discards random input if its length exceeds 4096 bytes. The limit has been raised to a buffer size diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index e3cc34c1..d86691c5 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -1791,7 +1791,7 @@ my %targets = ( }, "vms-ia64" => { inherit_from => [ "vms-generic", - sub { vms_info()->{as} + sub { vms_info()->{AS} ? asm("ia64_asm")->() : () } ], bn_ops => "SIXTY_FOUR_BIT RC4_INT", pointer_size => "", diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index 71660b36..c6a31c8d 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -766,7 +766,7 @@ reconfigure reconf : $target : $args{generator}->[0] $deps $mkdef \$(PERL) $mkdef$ord_ver --ordinals $args{generator}->[0] --name $ord_name "--OS" "VMS"$case_insensitive > $target EOF - } elsif ($target !~ /\.[sS]$/) { + } elsif ($args{src} !~ /\.[sS]$/) { my $target = $args{src}; if ($args{generator}->[0] =~ m|^.*\.in$|) { my $dofile = abs2rel(rel2abs(catfile($config{sourcedir}, @@ -823,7 +823,7 @@ $target : $args{generator}->[0] $deps \@ DELETE/SYMBOL/LOCAL extradefines \@ $incs_off RENAME \$\@-i \$\@ - DELETE \$\@-S + DELETE \$\@-S; EOF } # Otherwise.... @@ -847,7 +847,7 @@ EOF sub src2obj { my %args = @_; - my @srcs = map { (my $x = $_) =~ s/\.s$/.asm/; $x + my @srcs = map { (my $x = $_) =~ s/\.[sS]$/.asm/; $x } ( @{$args{srcs}} ); (my $obj = $args{obj}) =~ s|\.o$||; my $deps = join(", -\n\t\t", @srcs, @{$args{deps}}); diff --git a/Configurations/dist.conf b/Configurations/dist.conf deleted file mode 100644 index 2a458bcd..00000000 --- a/Configurations/dist.conf +++ /dev/null @@ -1,12 +0,0 @@ -## -*- mode: perl; -*- -## Build configuration targets for openssl-team members - -# This is to support 'make dist' -my %targets = ( - "dist" => { - inherit_from => [ 'BASE_unix' ], - CC => "cc", - CFLAGS => "-O", - thread_scheme => "(unknown)", - }, -); diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 8b4b6fe3..ecdd0c14 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -231,6 +231,7 @@ TARFLAGS= {- $target{TARFLAGS} -} BASENAME= openssl NAME= $(BASENAME)-$(VERSION) +# Relative to $(SRCDIR) TARFILE= ../$(NAME).tar ##### Project flags ################################################## @@ -644,7 +645,9 @@ install_runtime_libs: build_libs @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1) @ : {- output_off() if windowsdll(); "" -} @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(libdir) - @ : {- output_on() if windowsdll(); "" -} + @ : {- output_on() if windowsdll(); output_off() unless windowsdll(); "" -} + @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/bin + @ : {- output_on() unless windowsdll(); "" -} @$(ECHO) "*** Installing runtime libraries" @set -e; for s in dummy $(INSTALL_SHLIBS); do \ if [ "$$s" = "dummy" ]; then continue; fi; \ @@ -870,37 +873,8 @@ tags TAGS: FORCE # Release targets (note: only available on Unix) ##################### -# If your tar command doesn't support --owner and --group, make sure to -# use one that does, for example GNU tar -TAR_COMMAND=$(TAR) $(TARFLAGS) --owner 0 --group 0 -cf - -PREPARE_CMD=: tar: - set -e; \ - TMPDIR=/var/tmp/openssl-copy.$$$$; \ - DISTDIR=$(NAME); \ - mkdir -p $$TMPDIR/$$DISTDIR; \ - (cd $(SRCDIR); \ - excl_re=`git submodule status | sed -e 's/^.//' | cut -d' ' -f2`; \ - excl_re="^(fuzz/corpora|Configurations/.*\.norelease\.conf|`echo $$excl_re | sed -e 's/ /$$|/g'`\$$)"; \ - echo "$$excl_re"; \ - git ls-tree -r --name-only --full-tree HEAD \ - | egrep -v "$$excl_re" \ - | while read F; do \ - mkdir -p $$TMPDIR/$$DISTDIR/`dirname $$F`; \ - cp $$F $$TMPDIR/$$DISTDIR/$$F; \ - done); \ - (cd $$TMPDIR/$$DISTDIR; \ - $(PREPARE_CMD); \ - find . -type d -print | xargs chmod 755; \ - find . -type f -print | xargs chmod a+r; \ - find . -type f -perm -0100 -print | xargs chmod a+x); \ - (cd $$TMPDIR; $(TAR_COMMAND) $$DISTDIR) \ - | (cd $(SRCDIR); gzip --best > $(TARFILE).gz); \ - rm -rf $$TMPDIR - cd $(SRCDIR); ls -l $(TARFILE).gz - -dist: - @$(MAKE) PREPARE_CMD='$(PERL) ./Configure dist' TARFILE="$(TARFILE)" NAME="$(NAME)" tar + (cd $(SRCDIR); ./util/mktar.sh --name='$(NAME)' --tarfile='$(TARFILE)') # Helper targets ##################################################### diff --git a/Configure b/Configure index 94e48b41..cc061dc5 100755 --- a/Configure +++ b/Configure @@ -2249,6 +2249,9 @@ EOF dst => 'sources' } } } -> {$prodtype}; foreach my $kind (keys %$intent) { + next if ($intent->{$kind}->{dst} eq 'shared_sources' + && $disabled{shared}); + my @src = @{$intent->{$kind}->{src}}; my $dst = $intent->{$kind}->{dst}; my $prodselect = $intent->{$kind}->{prodselect} // sub { @_ }; diff --git a/NEWS b/NEWS index 56aab217..df16b789 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,11 @@ o Added EVP_MAC, an EVP layer MAC API, and a generic EVP_PKEY to EVP_MAC bridge. + Major changes between OpenSSL 1.1.1 and OpenSSL 1.1.1a [20 Nov 2018] + + o Timing vulnerability in DSA signature generation (CVE-2018-0734) + o Timing vulnerability in ECDSA signature generation (CVE-2018-0735) + Major changes between OpenSSL 1.1.0i and OpenSSL 1.1.1 [11 Sep 2018] o Support for TLSv1.3 added (see https://wiki.openssl.org/index.php/TLS1.3 diff --git a/apps/app_rand.c b/apps/app_rand.c index d0b2e834..2b0bbde0 100644 --- a/apps/app_rand.c +++ b/apps/app_rand.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/apps/pkeyutl.c b/apps/pkeyutl.c index 2c4e524b..38fd6249 100644 --- a/apps/pkeyutl.c +++ b/apps/pkeyutl.c @@ -37,8 +37,8 @@ typedef enum OPTION_choice { OPT_PUBIN, OPT_CERTIN, OPT_ASN1PARSE, OPT_HEXDUMP, OPT_SIGN, OPT_VERIFY, OPT_VERIFYRECOVER, OPT_REV, OPT_ENCRYPT, OPT_DECRYPT, OPT_DERIVE, OPT_SIGFILE, OPT_INKEY, OPT_PEERKEY, OPT_PASSIN, - OPT_PEERFORM, OPT_KEYFORM, OPT_PKEYOPT, OPT_KDF, OPT_KDFLEN, - OPT_R_ENUM + OPT_PEERFORM, OPT_KEYFORM, OPT_PKEYOPT, OPT_PKEYOPT_PASSIN, OPT_KDF, + OPT_KDFLEN, OPT_R_ENUM } OPTION_CHOICE; const OPTIONS pkeyutl_options[] = { @@ -66,6 +66,8 @@ const OPTIONS pkeyutl_options[] = { {"peerform", OPT_PEERFORM, 'E', "Peer key format - default PEM"}, {"keyform", OPT_KEYFORM, 'E', "Private key format - default PEM"}, {"pkeyopt", OPT_PKEYOPT, 's', "Public key options as opt:value"}, + {"pkeyopt_passin", OPT_PKEYOPT_PASSIN, 's', + "Public key option that is read as a passphrase argument opt:passphrase"}, OPT_R_OPTIONS, #ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, @@ -94,6 +96,7 @@ int pkeyutl_main(int argc, char **argv) const char *kdfalg = NULL; int kdflen = 0; STACK_OF(OPENSSL_STRING) *pkeyopts = NULL; + STACK_OF(OPENSSL_STRING) *pkeyopts_passin = NULL; prog = opt_init(argc, argv, pkeyutl_options); while ((o = opt_next()) != OPT_EOF) { @@ -192,6 +195,14 @@ int pkeyutl_main(int argc, char **argv) goto end; } break; + case OPT_PKEYOPT_PASSIN: + if ((pkeyopts_passin == NULL && + (pkeyopts_passin = sk_OPENSSL_STRING_new_null()) == NULL) || + sk_OPENSSL_STRING_push(pkeyopts_passin, opt_arg()) == 0) { + BIO_puts(bio_err, "out of memory\n"); + goto end; + } + break; } } argc = opt_num_rest(); @@ -240,6 +251,45 @@ int pkeyutl_main(int argc, char **argv) } } } + if (pkeyopts_passin != NULL) { + int num = sk_OPENSSL_STRING_num(pkeyopts_passin); + int i; + + for (i = 0; i < num; i++) { + char *opt = sk_OPENSSL_STRING_value(pkeyopts_passin, i); + char *passin = strchr(opt, ':'); + char *passwd; + + if (passin == NULL) { + /* Get password interactively */ + char passwd_buf[4096]; + BIO_snprintf(passwd_buf, sizeof(passwd_buf), "Enter %s: ", opt); + EVP_read_pw_string(passwd_buf, sizeof(passwd_buf) - 1, + passwd_buf, 0); + passwd = OPENSSL_strdup(passwd_buf); + if (passwd == NULL) { + BIO_puts(bio_err, "out of memory\n"); + goto end; + } + } else { + /* Get password as a passin argument: First split option name + * and passphrase argument into two strings */ + *passin = 0; + passin++; + if (app_passwd(passin, NULL, &passwd, NULL) == 0) { + BIO_printf(bio_err, "failed to get '%s'\n", opt); + goto end; + } + } + + if (EVP_PKEY_CTX_ctrl_str(ctx, opt, passwd) <= 0) { + BIO_printf(bio_err, "%s: Can't set parameter \"%s\":\n", + prog, opt); + goto end; + } + OPENSSL_free(passwd); + } + } if (sigfile != NULL && (pkey_op != EVP_PKEY_OP_VERIFY)) { BIO_printf(bio_err, @@ -359,6 +409,7 @@ int pkeyutl_main(int argc, char **argv) OPENSSL_free(buf_out); OPENSSL_free(sig); sk_OPENSSL_STRING_free(pkeyopts); + sk_OPENSSL_STRING_free(pkeyopts_passin); return ret; } diff --git a/apps/s_server.c b/apps/s_server.c index ac7dca60..15b4b430 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2754,6 +2754,8 @@ static int init_ssl_connection(SSL *con) BIO_ADDR_free(client); return 0; } + + (void)BIO_ctrl_set_connected(wbio, client); BIO_ADDR_free(client); dtlslisten = 0; } else { diff --git a/crypto/bn/asm/x86_64-gcc.c b/crypto/bn/asm/x86_64-gcc.c index e6f16983..31839ba0 100644 --- a/crypto/bn/asm/x86_64-gcc.c +++ b/crypto/bn/asm/x86_64-gcc.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 80f910c8..040c4cd9 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -737,26 +737,25 @@ int bn_cmp_part_words(const BN_ULONG *a, const BN_ULONG *b, int cl, int dl) return bn_cmp_words(a, b, cl); } -/* +/*- * Constant-time conditional swap of a and b. - * a and b are swapped if condition is not 0. The code assumes that at most one bit of condition is set. - * nwords is the number of words to swap. The code assumes that at least nwords are allocated in both a and b, - * and that no more than nwords are used by either a or b. - * a and b cannot be the same number + * a and b are swapped if condition is not 0. + * nwords is the number of words to swap. + * Assumes that at least nwords are allocated in both a and b. + * Assumes that no more than nwords are used by either a or b. */ void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) { BN_ULONG t; int i; + if (a == b) + return; + bn_wcheck_size(a, nwords); bn_wcheck_size(b, nwords); - assert(a != b); - assert((condition & (condition - 1)) == 0); - assert(sizeof(BN_ULONG) >= sizeof(int)); - - condition = ((condition - 1) >> (BN_BITS2 - 1)) - 1; + condition = ((~condition & ((condition - 1))) >> (BN_BITS2 - 1)) - 1; t = (a->top ^ b->top) & condition; a->top ^= t; @@ -794,42 +793,16 @@ void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) a->flags ^= t; b->flags ^= t; -#define BN_CONSTTIME_SWAP(ind) \ - do { \ - t = (a->d[ind] ^ b->d[ind]) & condition; \ - a->d[ind] ^= t; \ - b->d[ind] ^= t; \ - } while (0) - - switch (nwords) { - default: - for (i = 10; i < nwords; i++) - BN_CONSTTIME_SWAP(i); - /* Fallthrough */ - case 10: - BN_CONSTTIME_SWAP(9); /* Fallthrough */ - case 9: - BN_CONSTTIME_SWAP(8); /* Fallthrough */ - case 8: - BN_CONSTTIME_SWAP(7); /* Fallthrough */ - case 7: - BN_CONSTTIME_SWAP(6); /* Fallthrough */ - case 6: - BN_CONSTTIME_SWAP(5); /* Fallthrough */ - case 5: - BN_CONSTTIME_SWAP(4); /* Fallthrough */ - case 4: - BN_CONSTTIME_SWAP(3); /* Fallthrough */ - case 3: - BN_CONSTTIME_SWAP(2); /* Fallthrough */ - case 2: - BN_CONSTTIME_SWAP(1); /* Fallthrough */ - case 1: - BN_CONSTTIME_SWAP(0); + /* conditionally swap the data */ + for (i = 0; i < nwords; i++) { + t = (a->d[i] ^ b->d[i]) & condition; + a->d[i] ^= t; + b->d[i] ^= t; } -#undef BN_CONSTTIME_SWAP } +#undef BN_CONSTTIME_SWAP_FLAGS + /* Bits of security, see SP800-57 */ int BN_security_bits(int L, int N) diff --git a/crypto/err/err.c b/crypto/err/err.c index 03cbd738..34061bc6 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -19,6 +19,7 @@ #include #include #include "internal/thread_once.h" +#include "internal/ctype.h" static int err_load_strings(const ERR_STRING_DATA *str); @@ -181,8 +182,9 @@ static ERR_STRING_DATA *int_err_get_item(const ERR_STRING_DATA *d) } #ifndef OPENSSL_NO_ERR +/* A measurement on Linux 2018-11-21 showed about 3.5kib */ +# define SPACE_SYS_STR_REASONS 4 * 1024 # define NUM_SYS_STR_REASONS 127 -# define LEN_SYS_STR_REASON 32 static ERR_STRING_DATA SYS_str_reasons[NUM_SYS_STR_REASONS + 1]; /* @@ -198,7 +200,9 @@ static ERR_STRING_DATA SYS_str_reasons[NUM_SYS_STR_REASONS + 1]; static void build_SYS_str_reasons(void) { /* OPENSSL_malloc cannot be used here, use static storage instead */ - static char strerror_tab[NUM_SYS_STR_REASONS][LEN_SYS_STR_REASON]; + static char strerror_pool[SPACE_SYS_STR_REASONS]; + char *cur = strerror_pool; + size_t cnt = 0; static int init = 1; int i; @@ -213,9 +217,26 @@ static void build_SYS_str_reasons(void) str->error = ERR_PACK(ERR_LIB_SYS, 0, i); if (str->string == NULL) { - char (*dest)[LEN_SYS_STR_REASON] = &(strerror_tab[i - 1]); - if (openssl_strerror_r(i, *dest, sizeof(*dest))) - str->string = *dest; + if (openssl_strerror_r(i, cur, sizeof(strerror_pool) - cnt)) { + size_t l = strlen(cur); + + str->string = cur; + cnt += l; + if (cnt > sizeof(strerror_pool)) + cnt = sizeof(strerror_pool); + cur += l; + + /* + * VMS has an unusual quirk of adding spaces at the end of + * some (most? all?) messages. Lets trim them off. + */ + while (ossl_isspace(cur[-1])) { + cur--; + cnt--; + } + *cur++ = '\0'; + cnt++; + } } if (str->string == NULL) str->string = "unknown"; diff --git a/crypto/evp/e_rc2.c b/crypto/evp/e_rc2.c index 234d1eb1..aa0d1401 100644 --- a/crypto/evp/e_rc2.c +++ b/crypto/evp/e_rc2.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/rsa/rsa_ossl.c b/crypto/rsa/rsa_ossl.c index 2b1b006c..09762b7d 100644 --- a/crypto/rsa/rsa_ossl.c +++ b/crypto/rsa/rsa_ossl.c @@ -286,6 +286,11 @@ static int rsa_ossl_private_encrypt(int flen, const unsigned char *from, goto err; } + if (rsa->flags & RSA_FLAG_CACHE_PUBLIC) + if (!BN_MONT_CTX_set_locked(&rsa->_method_mod_n, rsa->lock, + rsa->n, ctx)) + goto err; + if (!(rsa->flags & RSA_FLAG_NO_BLINDING)) { blinding = rsa_get_blinding(rsa, &local_blinding, ctx); if (blinding == NULL) { @@ -318,13 +323,6 @@ static int rsa_ossl_private_encrypt(int flen, const unsigned char *from, } BN_with_flags(d, rsa->d, BN_FLG_CONSTTIME); - if (rsa->flags & RSA_FLAG_CACHE_PUBLIC) - if (!BN_MONT_CTX_set_locked(&rsa->_method_mod_n, rsa->lock, - rsa->n, ctx)) { - BN_free(d); - goto err; - } - if (!rsa->meth->bn_mod_exp(ret, f, d, rsa->n, ctx, rsa->_method_mod_n)) { BN_free(d); diff --git a/crypto/s390xcap.c b/crypto/s390xcap.c index 881613a4..c04e52dc 100644 --- a/crypto/s390xcap.c +++ b/crypto/s390xcap.c @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2010-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/sha/asm/sha512p8-ppc.pl b/crypto/sha/asm/sha512p8-ppc.pl index 2792800b..0d4fdd29 100755 --- a/crypto/sha/asm/sha512p8-ppc.pl +++ b/crypto/sha/asm/sha512p8-ppc.pl @@ -166,8 +166,8 @@ $func: addi r11,r11,32 stvx v30,r10,$sp stvx v31,r11,$sp - li r11,-4096+255 - stw $vrsave,`$FRAME+6*$SIZE_T-4`($sp) # save vrsave + li r11,-4096+255 # 0xfffff0ff + stw $vrsave,`$FRAME-6*$SIZE_T-4`($sp) # save vrsave li $x10,0x10 $PUSH r26,`$FRAME-6*$SIZE_T`($sp) li $x20,0x20 @@ -286,24 +286,17 @@ $code.=<<___ if ($SZ==8); stvx_u $G,$x30,$ctx ___ $code.=<<___; - li r10,`$LOCALS+15` + addi $offload,$sp,`$LOCALS+15` mtlr $lrsave - li r11,`$LOCALS+31` mtspr 256,$vrsave - lvx v24,r10,$sp # ABI says so - addi r10,r10,32 - lvx v25,r11,$sp - addi r11,r11,32 - lvx v26,r10,$sp - addi r10,r10,32 - lvx v27,r11,$sp - addi r11,r11,32 - lvx v28,r10,$sp - addi r10,r10,32 - lvx v29,r11,$sp - addi r11,r11,32 - lvx v30,r10,$sp - lvx v31,r11,$sp + lvx v24,$x00,$offload # ABI says so + lvx v25,$x10,$offload + lvx v26,$x20,$offload + lvx v27,$x30,$offload + lvx v28,$x40,$offload + lvx v29,$x50,$offload + lvx v30,$x60,$offload + lvx v31,$x70,$offload $POP r26,`$FRAME-6*$SIZE_T`($sp) $POP r27,`$FRAME-5*$SIZE_T`($sp) $POP r28,`$FRAME-4*$SIZE_T`($sp) diff --git a/doc/man1/list.pod b/doc/man1/list.pod index ca7af497..394d70e3 100644 --- a/doc/man1/list.pod +++ b/doc/man1/list.pod @@ -94,7 +94,7 @@ format described in L. =head1 COPYRIGHT -Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man1/pkeyutl.pod b/doc/man1/pkeyutl.pod index 664dbef3..a0dae86c 100644 --- a/doc/man1/pkeyutl.pod +++ b/doc/man1/pkeyutl.pod @@ -29,6 +29,7 @@ B B [B<-kdf algorithm>] [B<-kdflen length>] [B<-pkeyopt opt:value>] +[B<-pkeyopt_passin opt:passarg>] [B<-hexdump>] [B<-asn1parse>] [B<-rand file...>] @@ -140,6 +141,13 @@ Set the output length for KDF. Public key options specified as opt:value. See NOTES below for more details. +=item B<-pkeyopt_passin opt:passarg> + +Allows reading a public key option B from stdin or a password source. If +only opt is specified, the user will be prompted to enter the value on stdin. +Alternatively, passarg can be specified which can be any value supported by +B in L. + =item B<-hexdump> hex dump the output data. @@ -320,6 +328,16 @@ seed consisting of the single byte 0xFF: openssl pkeyutl -kdf TLS1-PRF -kdflen 48 -pkeyopt md:SHA256 \ -pkeyopt hexsecret:ff -pkeyopt hexseed:ff -hexdump +Derive a key using B where the password is read from command line: + + openssl pkeyutl -kdf scrypt -kdflen 16 -pkeyopt_passin pass \ + -pkeyopt hexsalt:aabbcc -pkeyopt N:16384 -pkeyopt r:8 -pkeyopt p:1 + +Derive using the same algorithm, but read key from environment variable MYPASS: + + openssl pkeyutl -kdf scrypt -kdflen 16 -pkeyopt_passin pass:env:MYPASS \ + -pkeyopt hexsalt:aabbcc -pkeyopt N:16384 -pkeyopt r:8 -pkeyopt p:1 + =head1 SEE ALSO L, L, L diff --git a/doc/man1/srp.pod b/doc/man1/srp.pod index 49774310..229a30a9 100644 --- a/doc/man1/srp.pod +++ b/doc/man1/srp.pod @@ -63,7 +63,7 @@ Generate verbose output while processing. =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_aes.pod b/doc/man3/EVP_aes.pod index a47c7eb4..4192a9ec 100644 --- a/doc/man3/EVP_aes.pod +++ b/doc/man3/EVP_aes.pod @@ -176,7 +176,7 @@ L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_aria.pod b/doc/man3/EVP_aria.pod index b98ec56b..fbb79187 100644 --- a/doc/man3/EVP_aria.pod +++ b/doc/man3/EVP_aria.pod @@ -106,7 +106,7 @@ L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_bf_cbc.pod b/doc/man3/EVP_bf_cbc.pod index 09b412d7..505d41b4 100644 --- a/doc/man3/EVP_bf_cbc.pod +++ b/doc/man3/EVP_bf_cbc.pod @@ -51,7 +51,7 @@ L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_camellia.pod b/doc/man3/EVP_camellia.pod index fe21cace..6ad59f84 100644 --- a/doc/man3/EVP_camellia.pod +++ b/doc/man3/EVP_camellia.pod @@ -89,7 +89,7 @@ L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_cast5_cbc.pod b/doc/man3/EVP_cast5_cbc.pod index 95c9b8da..0be07279 100644 --- a/doc/man3/EVP_cast5_cbc.pod +++ b/doc/man3/EVP_cast5_cbc.pod @@ -51,7 +51,7 @@ L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_des.pod b/doc/man3/EVP_des.pod index 9b42656c..a05149ff 100644 --- a/doc/man3/EVP_des.pod +++ b/doc/man3/EVP_des.pod @@ -95,7 +95,7 @@ L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_idea_cbc.pod b/doc/man3/EVP_idea_cbc.pod index 61d0150c..14dcc903 100644 --- a/doc/man3/EVP_idea_cbc.pod +++ b/doc/man3/EVP_idea_cbc.pod @@ -49,7 +49,7 @@ L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_rc2_cbc.pod b/doc/man3/EVP_rc2_cbc.pod index 8fde8e50..79769b82 100644 --- a/doc/man3/EVP_rc2_cbc.pod +++ b/doc/man3/EVP_rc2_cbc.pod @@ -65,7 +65,7 @@ L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_rc5_32_12_16_cbc.pod b/doc/man3/EVP_rc5_32_12_16_cbc.pod index 9d580daf..442a114e 100644 --- a/doc/man3/EVP_rc5_32_12_16_cbc.pod +++ b/doc/man3/EVP_rc5_32_12_16_cbc.pod @@ -56,7 +56,7 @@ L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/EVP_seed_cbc.pod b/doc/man3/EVP_seed_cbc.pod index cd753928..0d232951 100644 --- a/doc/man3/EVP_seed_cbc.pod +++ b/doc/man3/EVP_seed_cbc.pod @@ -51,7 +51,7 @@ L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/SSL_CTX_set1_curves.pod b/doc/man3/SSL_CTX_set1_curves.pod index 2757ccb9..7dca0e01 100644 --- a/doc/man3/SSL_CTX_set1_curves.pod +++ b/doc/man3/SSL_CTX_set1_curves.pod @@ -102,7 +102,7 @@ functions were first added to OpenSSL 1.1.1. =head1 COPYRIGHT -Copyright 2013-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2013-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/SSL_CTX_set_quiet_shutdown.pod b/doc/man3/SSL_CTX_set_quiet_shutdown.pod index d3e6d9ff..8ed9315d 100644 --- a/doc/man3/SSL_CTX_set_quiet_shutdown.pod +++ b/doc/man3/SSL_CTX_set_quiet_shutdown.pod @@ -62,7 +62,7 @@ L, L =head1 COPYRIGHT -Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/SSL_get_peer_tmp_key.pod b/doc/man3/SSL_get_peer_tmp_key.pod index 23006b3a..a722a813 100644 --- a/doc/man3/SSL_get_peer_tmp_key.pod +++ b/doc/man3/SSL_get_peer_tmp_key.pod @@ -43,7 +43,7 @@ L, L =head1 COPYRIGHT -Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/SSL_set_shutdown.pod b/doc/man3/SSL_set_shutdown.pod index 70108079..b1cf5892 100644 --- a/doc/man3/SSL_set_shutdown.pod +++ b/doc/man3/SSL_set_shutdown.pod @@ -71,7 +71,7 @@ L, L =head1 COPYRIGHT -Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/fuzz/helper.py b/fuzz/helper.py index 889af308..e83ea00c 100755 --- a/fuzz/helper.py +++ b/fuzz/helper.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/include/openssl/symhacks.h b/include/openssl/symhacks.h index b6d68efa..156ea6e4 100644 --- a/include/openssl/symhacks.h +++ b/include/openssl/symhacks.h @@ -1,5 +1,5 @@ /* - * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index 7a7a4bed..fcda3275 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 2005-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2005-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/ssl/record/record.h b/ssl/record/record.h index 76a2b81f..af56206e 100644 --- a/ssl/record/record.h +++ b/ssl/record/record.h @@ -1,5 +1,5 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/ssl/s3_cbc.c b/ssl/s3_cbc.c index 8e11864b..8377d7fe 100644 --- a/ssl/s3_cbc.c +++ b/ssl/s3_cbc.c @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2012-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c index 0a11b881..5a8f1163 100644 --- a/ssl/statem/statem_clnt.c +++ b/ssl/statem/statem_clnt.c @@ -2353,7 +2353,8 @@ MSG_PROCESS_RETURN tls_process_key_exchange(SSL *s, PACKET *pkt) } #ifdef SSL_DEBUG if (SSL_USE_SIGALGS(s)) - fprintf(stderr, "USING TLSv1.2 HASH %s\n", EVP_MD_name(md)); + fprintf(stderr, "USING TLSv1.2 HASH %s\n", + md == NULL ? "n/a" : EVP_MD_name(md)); #endif if (!PACKET_get_length_prefixed_2(pkt, &signature) diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index d0de7ffe..b6fc21d6 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -396,7 +396,8 @@ MSG_PROCESS_RETURN tls_process_cert_verify(SSL *s, PACKET *pkt) #ifdef SSL_DEBUG if (SSL_USE_SIGALGS(s)) - fprintf(stderr, "USING TLSv1.2 HASH %s\n", EVP_MD_name(md)); + fprintf(stderr, "USING TLSv1.2 HASH %s\n", + md == NULL ? "n/a" : EVP_MD_name(md)); #endif /* Check for broken implementations of GOST ciphersuites */ @@ -439,7 +440,8 @@ MSG_PROCESS_RETURN tls_process_cert_verify(SSL *s, PACKET *pkt) } #ifdef SSL_DEBUG - fprintf(stderr, "Using client verify alg %s\n", EVP_MD_name(md)); + fprintf(stderr, "Using client verify alg %s\n", + md == NULL ? "n/a" : EVP_MD_name(md)); #endif if (EVP_DigestVerifyInit(mctx, &pctx, md, NULL, pkey) <= 0) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_PROCESS_CERT_VERIFY, diff --git a/test/cipher_overhead_test.c b/test/cipher_overhead_test.c index 8997fcc5..296fa0ac 100644 --- a/test/cipher_overhead_test.c +++ b/test/cipher_overhead_test.c @@ -1,5 +1,5 @@ /* - * Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/test/drbgtest.h b/test/drbgtest.h index f4d867ef..7342b385 100644 --- a/test/drbgtest.h +++ b/test/drbgtest.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2011-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t index 015dee95..31007e6a 100644 --- a/test/recipes/01-test_symbol_presence.t +++ b/test/recipes/01-test_symbol_presence.t @@ -1,6 +1,6 @@ #! /usr/bin/env perl # -*- mode: Perl -*- -# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/test/recipes/02-test_errstr.t b/test/recipes/02-test_errstr.t new file mode 100644 index 00000000..ef5e2fa3 --- /dev/null +++ b/test/recipes/02-test_errstr.t @@ -0,0 +1,78 @@ +#! /usr/bin/env perl +# Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. +# +# Licensed under the OpenSSL license (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + +use strict; +no strict 'refs'; # To be able to use strings as function refs +use OpenSSL::Test; +use OpenSSL::Test::Utils; +use Errno qw(:POSIX); +use POSIX qw(strerror); + +# We actually have space for up to 4095 error messages, +# numerically speaking... but we're currently only using +# numbers 1 through 127. +# This constant should correspond to the same constant +# defined in crypto/err/err.c, or at least must not be +# assigned a greater number. +use constant NUM_SYS_STR_REASONS => 127; + +setup('test_errstr'); + +# In a cross compiled situation, there are chances that our +# application is linked against different C libraries than +# perl, and may thereby get different error messages for the +# same error. +# The safest is not to test under such circumstances. +plan skip_all => 'This is unsupported for cross compiled configurations' + if config('CROSS_COMPILE'); + +plan skip_all => 'OpenSSL is configured "no-autoerrinit" or "no-err"' + if disabled('autoerrinit') || disabled('err'); + +# These are POSIX error names, which Errno implements as functions +# (this is documented) +my @posix_errors = @{$Errno::EXPORT_TAGS{POSIX}}; + +plan tests => scalar @posix_errors + +1 # Checking that error 128 gives 'reason(128)' + +1 # Checking that error 0 gives the library name + ; + +foreach my $errname (@posix_errors) { + my $errnum = "Errno::$errname"->(); + + SKIP: { + skip "Error $errname ($errnum) isn't within our range", 1 + if $errnum > NUM_SYS_STR_REASONS; + + my $perr = eval { + # Set $! to the error number... + local $! = $errnum; + # ... and $! will give you the error string back + $! + }; + + # We know that the system reasons are in OpenSSL error library 2 + my @oerr = run(app([ qw(openssl errstr), sprintf("2%06x", $errnum) ]), + capture => 1); + $oerr[0] =~ s|\R$||; + $oerr[0] =~ s|.*system library:||g; # The actual message is last + + ok($oerr[0] eq $perr, "($errnum) '$oerr[0]' == '$perr'"); + } +} + +my @after = run(app([ qw(openssl errstr 2000080) ]), capture => 1); +$after[0] =~ s|\R$||; +$after[0] =~ s|.*system library:||g; +ok($after[0] eq "reason(128)", "(128) '$after[0]' == 'reason(128)'"); + +my @zero = run(app([ qw(openssl errstr 2000000) ]), capture => 1); +$zero[0] =~ s|\R$||; +$zero[0] =~ s|.*system library:||g; +ok($zero[0] eq "system library", "(0) '$zero[0]' == 'system library'"); diff --git a/test/recipes/02-test_internal_ctype.t b/test/recipes/02-test_internal_ctype.t index 99900211..daacfe0f 100644 --- a/test/recipes/02-test_internal_ctype.t +++ b/test/recipes/02-test_internal_ctype.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. # Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. # # Licensed under the OpenSSL license (the "License"). You may not use diff --git a/test/recipes/03-test_internal_asn1.t b/test/recipes/03-test_internal_asn1.t index f6f3b5c0..5f27214e 100644 --- a/test/recipes/03-test_internal_asn1.t +++ b/test/recipes/03-test_internal_asn1.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/test/recipes/03-test_internal_chacha.t b/test/recipes/03-test_internal_chacha.t index 14ec5c61..b115392c 100644 --- a/test/recipes/03-test_internal_chacha.t +++ b/test/recipes/03-test_internal_chacha.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/test/recipes/03-test_internal_modes.t b/test/recipes/03-test_internal_modes.t index 09c0664b..1f75bd8b 100644 --- a/test/recipes/03-test_internal_modes.t +++ b/test/recipes/03-test_internal_modes.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/test/recipes/03-test_internal_poly1305.t b/test/recipes/03-test_internal_poly1305.t index a3b98491..42f26c12 100644 --- a/test/recipes/03-test_internal_poly1305.t +++ b/test/recipes/03-test_internal_poly1305.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/test/recipes/03-test_internal_siphash.t b/test/recipes/03-test_internal_siphash.t index f5e88905..408a674f 100644 --- a/test/recipes/03-test_internal_siphash.t +++ b/test/recipes/03-test_internal_siphash.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/test/recipes/03-test_internal_ssl_cert_table.t b/test/recipes/03-test_internal_ssl_cert_table.t index 8872cd5a..334e47e7 100644 --- a/test/recipes/03-test_internal_ssl_cert_table.t +++ b/test/recipes/03-test_internal_ssl_cert_table.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/test/recipes/03-test_internal_x509.t b/test/recipes/03-test_internal_x509.t index ef140eb3..972ff65f 100644 --- a/test/recipes/03-test_internal_x509.t +++ b/test/recipes/03-test_internal_x509.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/test/rsa_test.c b/test/rsa_test.c index 25709e41..bf25fd19 100644 --- a/test/rsa_test.c +++ b/test/rsa_test.c @@ -1,5 +1,5 @@ /* - * Copyright 1999-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/test/ssl-tests/28-seclevel.conf.in b/test/ssl-tests/28-seclevel.conf.in index 9f85a955..12b90211 100644 --- a/test/ssl-tests/28-seclevel.conf.in +++ b/test/ssl-tests/28-seclevel.conf.in @@ -1,5 +1,5 @@ # -*- mode: perl; -*- -# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy diff --git a/test/wpackettest.c b/test/wpackettest.c index 71eb7634..1b5b3ba3 100644 --- a/test/wpackettest.c +++ b/test/wpackettest.c @@ -1,5 +1,5 @@ /* - * Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/util/mktar.sh b/util/mktar.sh new file mode 100755 index 00000000..17115cf5 --- /dev/null +++ b/util/mktar.sh @@ -0,0 +1,36 @@ +#! /bin/sh +# Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. +# +# Licensed under the OpenSSL license (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + +HERE=`dirname $0` + +version=`grep 'OPENSSL_VERSION_TEXT *"OpenSSL' $HERE/../include/openssl/opensslv.h | sed -e 's|.*"OpenSSL ||' -e 's| .*||'` +basename=openssl + +NAME="$basename-$version" + +while [ $# -gt 0 ]; do + case "$1" in + --name=* ) NAME=`echo "$1" | sed -e 's|[^=]*=||'` ;; + --name ) shift; NAME="$1" ;; + --tarfile=* ) TARFILE=`echo "$1" | sed -e 's|[^=]*=||'` ;; + --tarfile ) shift; TARFILE="$1" ;; + * ) echo >&2 "Could not parse '$1'"; exit 1 ;; + esac + shift +done + +if [ -z "$TARFILE" ]; then TARFILE="$NAME.tar"; fi + +# This counts on .gitattributes to specify what files should be ignored +git archive --worktree-attributes --format=tar --prefix="$NAME/" -v HEAD \ + | gzip -9 > "$TARFILE.gz" + +# Good old way to ensure we display an absolute path +td=`dirname $TARFILE` +tf=`basename $TARFILE` +ls -l "`cd $td; pwd`/$tf.gz"