aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--erts/emulator/beam/beam_bif_load.c1
-rw-r--r--erts/emulator/beam/beam_load.c4
-rw-r--r--erts/emulator/drivers/common/inet_drv.c8
-rw-r--r--erts/emulator/hipe/hipe_bif1.c49
-rw-r--r--erts/preloaded/ebin/prim_inet.beambin57272 -> 57280 bytes
-rw-r--r--erts/preloaded/src/prim_inet.erl4
-rw-r--r--lib/appmon/vsn.mk18
-rw-r--r--lib/erl_docgen/vsn.mk21
-rw-r--r--lib/et/doc/src/et.xml1
-rw-r--r--lib/et/doc/src/et_collector.xml1
-rw-r--r--lib/et/doc/src/et_selector.xml1
-rw-r--r--lib/et/doc/src/et_tutorial.xmlsrc1
-rw-r--r--lib/et/doc/src/et_viewer.xml1
-rw-r--r--lib/et/vsn.mk18
-rw-r--r--lib/hipe/icode/hipe_icode_exceptions.erl10
-rw-r--r--lib/hipe/main/hipe.erl4
-rw-r--r--lib/inets/vsn.mk19
-rw-r--r--lib/jinterface/vsn.mk18
-rw-r--r--lib/kernel/src/gen_sctp.erl8
-rw-r--r--lib/kernel/src/inet6_sctp.erl23
-rw-r--r--lib/kernel/src/inet_sctp.erl21
-rw-r--r--lib/kernel/src/net_kernel.erl4
-rw-r--r--lib/kernel/test/erl_distribution_SUITE.erl2
-rw-r--r--lib/kernel/test/gen_sctp_SUITE.erl189
-rw-r--r--lib/kernel/vsn.mk19
-rw-r--r--lib/megaco/vsn.mk19
-rw-r--r--lib/public_key/test/Makefile2
-rw-r--r--lib/public_key/test/erl_make_certs.erl (renamed from lib/public_key/test/pkey_test.erl)41
-rw-r--r--lib/public_key/test/pkits_SUITE.erl4
-rw-r--r--lib/public_key/test/public_key_SUITE.erl60
-rw-r--r--lib/reltool/vsn.mk18
-rw-r--r--lib/snmp/vsn.mk19
-rw-r--r--lib/ssl/vsn.mk19
-rw-r--r--lib/stdlib/vsn.mk19
-rw-r--r--lib/tools/vsn.mk18
-rw-r--r--lib/tv/vsn.mk19
-rw-r--r--lib/xmerl/vsn.mk19
37 files changed, 342 insertions, 360 deletions
diff --git a/erts/emulator/beam/beam_bif_load.c b/erts/emulator/beam/beam_bif_load.c
index 4fc271d41c..6ae9736141 100644
--- a/erts/emulator/beam/beam_bif_load.c
+++ b/erts/emulator/beam/beam_bif_load.c
@@ -337,7 +337,6 @@ BIF_RETTYPE finish_after_on_load_2(BIF_ALIST_2)
ep->code[0] == BIF_ARG_1 &&
ep->code[4] != 0) {
ep->address = (void *) ep->code[4];
- ep->code[3] = 0;
ep->code[4] = 0;
}
}
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index 74777e4c26..df5602b040 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -1379,8 +1379,10 @@ read_code_header(LoaderState* stp)
stp->ci = MI_FUNCTIONS + stp->num_functions + 1;
stp->code[MI_ATTR_PTR] = 0;
+ stp->code[MI_ATTR_SIZE] = 0;
stp->code[MI_ATTR_SIZE_ON_HEAP] = 0;
stp->code[MI_COMPILE_PTR] = 0;
+ stp->code[MI_COMPILE_SIZE] = 0;
stp->code[MI_COMPILE_SIZE_ON_HEAP] = 0;
stp->code[MI_NUM_BREAKPOINTS] = 0;
@@ -5199,8 +5201,10 @@ erts_make_stub_module(Process* p, Eterm Mod, Eterm Beam, Eterm Info)
code[MI_NUM_FUNCTIONS] = n;
code[MI_ATTR_PTR] = 0;
+ code[MI_ATTR_SIZE] = 0;
code[MI_ATTR_SIZE_ON_HEAP] = 0;
code[MI_COMPILE_PTR] = 0;
+ code[MI_COMPILE_SIZE] = 0;
code[MI_COMPILE_SIZE_ON_HEAP] = 0;
code[MI_NUM_BREAKPOINTS] = 0;
code[MI_ON_LOAD_FUNCTION_PTR] = 0;
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
index 059288d1cb..79e58beb40 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -5032,8 +5032,8 @@ static int sctp_set_opts(inet_descriptor* desc, char* ptr, int len)
}
case INET_OPT_LINGER:
{
- CHKLEN(curr, ASSOC_ID_LEN + 2 + 4);
- arg.lin.l_onoff = get_int16 (curr); curr += 2;
+ CHKLEN(curr, 2*4);
+ arg.lin.l_onoff = get_int32 (curr); curr += 4;
arg.lin.l_linger = get_int32 (curr); curr += 4;
proto = SOL_SOCKET;
@@ -6193,6 +6193,10 @@ static int sctp_fill_opts(inet_descriptor* desc, char* buf, int buflen,
struct sctp_sndrcvinfo sri;
unsigned int sz = sizeof(sri);
+ if (buflen < ASSOC_ID_LEN) RETURN_ERROR(spec, -EINVAL);
+ sri.sinfo_assoc_id = GET_ASSOC_ID(buf);
+ buf += ASSOC_ID_LEN;
+ buflen -= ASSOC_ID_LEN;
if (sock_getopt(desc->s, IPPROTO_SCTP, SCTP_DEFAULT_SEND_PARAM,
&sri, &sz) < 0) continue;
/* Fill in the response: */
diff --git a/erts/emulator/hipe/hipe_bif1.c b/erts/emulator/hipe/hipe_bif1.c
index 5188950e17..8f43811537 100644
--- a/erts/emulator/hipe/hipe_bif1.c
+++ b/erts/emulator/hipe/hipe_bif1.c
@@ -876,22 +876,44 @@ BIF_RETTYPE hipe_bifs_misc_timer_clear_0(BIF_ALIST_0)
* + The fallback, which is the same as {X,_} = runtime(statistics).
*/
+static double fallback_get_hrvtime(void)
+{
+ unsigned long ms_user;
+
+ elapsed_time_both(&ms_user, NULL, NULL, NULL);
+ return (double)ms_user;
+}
+
#if USE_PERFCTR
#include "hipe_perfctr.h"
-static int hrvtime_is_open;
-#define hrvtime_is_started() hrvtime_is_open
+static int hrvtime_started; /* 0: closed, +1: perfctr, -1: fallback */
+#define hrvtime_is_started() (hrvtime_started != 0)
static void start_hrvtime(void)
{
if (hipe_perfctr_hrvtime_open() >= 0)
- hrvtime_is_open = 1;
+ hrvtime_started = 1;
+ else
+ hrvtime_started = -1;
}
-#define get_hrvtime() hipe_perfctr_hrvtime_get()
-#define stop_hrvtime() hipe_perfctr_hrvtime_close()
+static void stop_hrvtime(void)
+{
+ if (hrvtime_started > 0)
+ hipe_perfctr_hrvtime_close();
+ hrvtime_started = 0;
+}
-#else
+static double get_hrvtime(void)
+{
+ if (hrvtime_started > 0)
+ return hipe_perfctr_hrvtime_get();
+ else
+ return fallback_get_hrvtime();
+}
+
+#else /* !USE_PERFCTR */
/*
* Fallback, if nothing better exists.
@@ -902,15 +924,9 @@ static void start_hrvtime(void)
#define hrvtime_is_started() 1
#define start_hrvtime() do{}while(0)
#define stop_hrvtime() do{}while(0)
+#define get_hrvtime() fallback_get_hrvtime()
-static double get_hrvtime(void)
-{
- unsigned long ms_user;
- elapsed_time_both(&ms_user, NULL, NULL, NULL);
- return (double)ms_user;
-}
-
-#endif /* hrvtime support */
+#endif /* !USE_PERFCTR */
BIF_RETTYPE hipe_bifs_get_hrvtime_0(BIF_ALIST_0)
{
@@ -918,11 +934,8 @@ BIF_RETTYPE hipe_bifs_get_hrvtime_0(BIF_ALIST_0)
Eterm res;
FloatDef f;
- if (!hrvtime_is_started()) {
+ if (!hrvtime_is_started())
start_hrvtime();
- if (!hrvtime_is_started())
- BIF_RET(NIL); /* arity 0 BIFs may not fail */
- }
f.fd = get_hrvtime();
hp = HAlloc(BIF_P, FLOAT_SIZE_OBJECT);
res = make_float(hp);
diff --git a/erts/preloaded/ebin/prim_inet.beam b/erts/preloaded/ebin/prim_inet.beam
index ac336c1b2d..71f6643368 100644
--- a/erts/preloaded/ebin/prim_inet.beam
+++ b/erts/preloaded/ebin/prim_inet.beam
Binary files differ
diff --git a/erts/preloaded/src/prim_inet.erl b/erts/preloaded/src/prim_inet.erl
index 0feb591efb..91d39c6a73 100644
--- a/erts/preloaded/src/prim_inet.erl
+++ b/erts/preloaded/src/prim_inet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1206,7 +1206,7 @@ type_opt_1(sctp_default_send_param) ->
timetolive = [uint32,0],
tsn = [],
cumtsn = [],
- assoc_id = [sctp_assoc_id,0]}}];
+ assoc_id = [[sctp_assoc_id,0]]}}];
%% for SCTP_OPT_EVENTS
type_opt_1(sctp_events) ->
[{record,#sctp_event_subscribe{
diff --git a/lib/appmon/vsn.mk b/lib/appmon/vsn.mk
index cfcb5d3eb6..0675a4eb8b 100644
--- a/lib/appmon/vsn.mk
+++ b/lib/appmon/vsn.mk
@@ -1,19 +1 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2010. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-
APPMON_VSN = 2.1.12
diff --git a/lib/erl_docgen/vsn.mk b/lib/erl_docgen/vsn.mk
index 5b14051034..33d8c1f708 100644
--- a/lib/erl_docgen/vsn.mk
+++ b/lib/erl_docgen/vsn.mk
@@ -1,22 +1 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2009-2010. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-#
-
ERL_DOCGEN_VSN = 0.2.1
-
-TICKETS =
diff --git a/lib/et/doc/src/et.xml b/lib/et/doc/src/et.xml
index 9b170dd7d9..5e3453c348 100644
--- a/lib/et/doc/src/et.xml
+++ b/lib/et/doc/src/et.xml
@@ -29,6 +29,7 @@
<checked></checked>
<date></date>
<rev>%VSN%</rev>
+ <file>et</file>
</header>
<module>et</module>
<modulesummary>Main API of the Event Trace (ET) application</modulesummary>
diff --git a/lib/et/doc/src/et_collector.xml b/lib/et/doc/src/et_collector.xml
index 88c478c89a..e9885dcbb3 100644
--- a/lib/et/doc/src/et_collector.xml
+++ b/lib/et/doc/src/et_collector.xml
@@ -29,6 +29,7 @@
<checked></checked>
<date></date>
<rev>%VSN%</rev>
+ <file>et_collector.xml</file>
</header>
<module>et_collector</module>
<modulesummary>Collect trace events and provide a backing storage appropriate for iteration </modulesummary>
diff --git a/lib/et/doc/src/et_selector.xml b/lib/et/doc/src/et_selector.xml
index dd12166d85..34203306bb 100644
--- a/lib/et/doc/src/et_selector.xml
+++ b/lib/et/doc/src/et_selector.xml
@@ -29,6 +29,7 @@
<checked></checked>
<date></date>
<rev>%VSN%</rev>
+ <file>et_selector.xml</file>
</header>
<module>et_selector</module>
<modulesummary>Define event transforms and trace patterns</modulesummary>
diff --git a/lib/et/doc/src/et_tutorial.xmlsrc b/lib/et/doc/src/et_tutorial.xmlsrc
index c72234a587..b0e2bf4af6 100644
--- a/lib/et/doc/src/et_tutorial.xmlsrc
+++ b/lib/et/doc/src/et_tutorial.xmlsrc
@@ -29,6 +29,7 @@
<checked></checked>
<date></date>
<rev>%VSN%</rev>
+ <file>et_tutorial.xml</file>
</header>
<section>
diff --git a/lib/et/doc/src/et_viewer.xml b/lib/et/doc/src/et_viewer.xml
index c16e5b8869..d4cfbdfa31 100644
--- a/lib/et/doc/src/et_viewer.xml
+++ b/lib/et/doc/src/et_viewer.xml
@@ -29,6 +29,7 @@
<checked></checked>
<date></date>
<rev>%VSN%</rev>
+ <file>et_viewer.xml</file>
</header>
<module>et_viewer</module>
<modulesummary>Displays a sequence chart for trace events (messages/actions)</modulesummary>
diff --git a/lib/et/vsn.mk b/lib/et/vsn.mk
index c3a42af156..04ecb8c82e 100644
--- a/lib/et/vsn.mk
+++ b/lib/et/vsn.mk
@@ -1,19 +1 @@
-# This is an -*-makefile-*- file.
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2002-2010. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-
ET_VSN = 1.4
diff --git a/lib/hipe/icode/hipe_icode_exceptions.erl b/lib/hipe/icode/hipe_icode_exceptions.erl
index 787fb05415..3c8f7b5712 100644
--- a/lib/hipe/icode/hipe_icode_exceptions.erl
+++ b/lib/hipe/icode/hipe_icode_exceptions.erl
@@ -344,6 +344,16 @@ pop_catch(Cs) ->
pop_catch_1([[_|C] | Cs]) ->
[C | pop_catch_1(Cs)];
+pop_catch_1([[] | Cs]) ->
+ %% The elements in the list represent different possible incoming
+ %% stacks of catch handlers to this BB. Before the fixpoint has
+ %% been found these elements are underapproximations of the true
+ %% stacks, therefore it's possible for these elements to be too
+ %% short for the number of pops implied by the code in the BB.
+ %% We must not fail in that case, so we set pop([]) = [].
+ %% This fixes find_catches_crash.erl and compiler_tests in the
+ %% HiPE test suite.
+ [[] | pop_catch_1(Cs)];
pop_catch_1([]) ->
[].
diff --git a/lib/hipe/main/hipe.erl b/lib/hipe/main/hipe.erl
index ed722fecba..c80fb6a0a2 100644
--- a/lib/hipe/main/hipe.erl
+++ b/lib/hipe/main/hipe.erl
@@ -274,7 +274,7 @@ load(Mod, BeamFileName) when is_list(BeamFileName) ->
Architecture = erlang:system_info(hipe_architecture),
ChunkName = hipe_unified_loader:chunk_name(Architecture),
case beam_lib:chunks(BeamFileName, [ChunkName]) of
- {ok,{_,[{_,Bin}]}} when is_binary(Bin) -> do_load(Mod, Bin, Bin);
+ {ok,{_,[{_,Bin}]}} when is_binary(Bin) -> do_load(Mod, Bin, BeamFileName);
Error -> {error, Error}
end.
@@ -913,7 +913,7 @@ do_load(Mod, Bin, WholeModule) ->
%% In this case, the emulated code for the module must be loaded.
{module, Mod} = code:ensure_loaded(Mod),
code:load_native_partial(Mod, Bin);
- BinCode when is_binary(BinCode) ->
+ BeamBinOrPath when is_binary(BeamBinOrPath) orelse is_list(BeamBinOrPath) ->
case code:is_sticky(Mod) of
true ->
%% We unpack and repack the Beam binary as a workaround to
diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk
index ea6f4c9903..b53d47d99c 100644
--- a/lib/inets/vsn.mk
+++ b/lib/inets/vsn.mk
@@ -1,22 +1,3 @@
-#-*-makefile-*- ; force emacs to enter makefile-mode
-
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2010. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-
APPLICATION = inets
INETS_VSN = 5.4
PRE_VSN =
diff --git a/lib/jinterface/vsn.mk b/lib/jinterface/vsn.mk
index 6b5719d7c5..26613febbf 100644
--- a/lib/jinterface/vsn.mk
+++ b/lib/jinterface/vsn.mk
@@ -1,19 +1 @@
-##
-## %CopyrightBegin%
-##
-## Copyright Ericsson AB 2000-2010. All Rights Reserved.
-##
-## The contents of this file are subject to the Erlang Public License,
-## Version 1.1, (the "License"); you may not use this file except in
-## compliance with the License. You should have received a copy of the
-## Erlang Public License along with this software. If not, it can be
-## retrieved online at http://www.erlang.org/.
-##
-## Software distributed under the License is distributed on an "AS IS"
-## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-## the License for the specific language governing rights and limitations
-## under the License.
-##
-## %CopyrightEnd%
-
JINTERFACE_VSN = 1.5.3
diff --git a/lib/kernel/src/gen_sctp.erl b/lib/kernel/src/gen_sctp.erl
index 5a31e3976f..a1542ab507 100644
--- a/lib/kernel/src/gen_sctp.erl
+++ b/lib/kernel/src/gen_sctp.erl
@@ -166,18 +166,14 @@ send(S, #sctp_assoc_change{assoc_id=AssocId}, Stream, Data)
when is_port(S), is_integer(Stream) ->
case inet_db:lookup_socket(S) of
{ok,Mod} ->
- Mod:sendmsg(S, #sctp_sndrcvinfo{
- stream = Stream,
- assoc_id = AssocId}, Data);
+ Mod:send(S, AssocId, Stream, Data);
Error -> Error
end;
send(S, AssocId, Stream, Data)
when is_port(S), is_integer(AssocId), is_integer(Stream) ->
case inet_db:lookup_socket(S) of
{ok,Mod} ->
- Mod:sendmsg(S, #sctp_sndrcvinfo{
- stream = Stream,
- assoc_id = AssocId}, Data);
+ Mod:send(S, AssocId, Stream, Data);
Error -> Error
end;
send(S, AssocChange, Stream, Data) ->
diff --git a/lib/kernel/src/inet6_sctp.erl b/lib/kernel/src/inet6_sctp.erl
index 5c49c4fec3..5bf3fca647 100644
--- a/lib/kernel/src/inet6_sctp.erl
+++ b/lib/kernel/src/inet6_sctp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -32,7 +32,7 @@
-define(FAMILY, inet6).
-export([getserv/1,getaddr/1,getaddr/2,translate_ip/1]).
--export([open/1,close/1,listen/2,connect/5,sendmsg/3,recv/2]).
+-export([open/1,close/1,listen/2,connect/5,sendmsg/3,send/4,recv/2]).
@@ -71,5 +71,24 @@ connect(S, Addr, Port, Opts, Timer) ->
sendmsg(S, SRI, Data) ->
prim_inet:sendmsg(S, SRI, Data).
+send(S, AssocId, Stream, Data) ->
+ case prim_inet:getopts(
+ S,
+ [{sctp_default_send_param,#sctp_sndrcvinfo{assoc_id=AssocId}}]) of
+ {ok,
+ [{sctp_default_send_param,
+ #sctp_sndrcvinfo{
+ flags=Flags, context=Context, ppid=PPID, timetolive=TTL}}]} ->
+ prim_inet:sendmsg(
+ S,
+ #sctp_sndrcvinfo{
+ flags=Flags, context=Context, ppid=PPID, timetolive=TTL,
+ assoc_id=AssocId, stream=Stream},
+ Data);
+ _ ->
+ prim_inet:sendmsg(
+ S, #sctp_sndrcvinfo{assoc_id=AssocId, stream=Stream}, Data)
+ end.
+
recv(S, Timeout) ->
prim_inet:recvfrom(S, 0, Timeout).
diff --git a/lib/kernel/src/inet_sctp.erl b/lib/kernel/src/inet_sctp.erl
index 795bf83807..de74b573bd 100644
--- a/lib/kernel/src/inet_sctp.erl
+++ b/lib/kernel/src/inet_sctp.erl
@@ -31,7 +31,7 @@
-define(FAMILY, inet).
-export([getserv/1,getaddr/1,getaddr/2,translate_ip/1]).
--export([open/1,close/1,listen/2,connect/5,sendmsg/3,recv/2]).
+-export([open/1,close/1,listen/2,connect/5,sendmsg/3,send/4,recv/2]).
@@ -141,5 +141,24 @@ connect_get_assoc(S, Addr, Port, Active, Timer) ->
sendmsg(S, SRI, Data) ->
prim_inet:sendmsg(S, SRI, Data).
+send(S, AssocId, Stream, Data) ->
+ case prim_inet:getopts(
+ S,
+ [{sctp_default_send_param,#sctp_sndrcvinfo{assoc_id=AssocId}}]) of
+ {ok,
+ [{sctp_default_send_param,
+ #sctp_sndrcvinfo{
+ flags=Flags, context=Context, ppid=PPID, timetolive=TTL}}]} ->
+ prim_inet:sendmsg(
+ S,
+ #sctp_sndrcvinfo{
+ flags=Flags, context=Context, ppid=PPID, timetolive=TTL,
+ assoc_id=AssocId, stream=Stream},
+ Data);
+ _ ->
+ prim_inet:sendmsg(
+ S, #sctp_sndrcvinfo{assoc_id=AssocId, stream=Stream}, Data)
+ end.
+
recv(S, Timeout) ->
prim_inet:recvfrom(S, 0, Timeout).
diff --git a/lib/kernel/src/net_kernel.erl b/lib/kernel/src/net_kernel.erl
index 0e5cc8c2c6..f5e2820bbe 100644
--- a/lib/kernel/src/net_kernel.erl
+++ b/lib/kernel/src/net_kernel.erl
@@ -500,8 +500,8 @@ handle_call({new_ticktime,T,TP}, From, #state{tick = #tick{ticker = Tckr,
time = T,
how = How}}}, From);
-handle_call({new_ticktime,From,_},
- _,
+handle_call({new_ticktime,_T,_TP},
+ From,
#state{tick = #tick_change{time = T}} = State) ->
async_reply({reply, {ongoing_change_to, T}, State}, From);
diff --git a/lib/kernel/test/erl_distribution_SUITE.erl b/lib/kernel/test/erl_distribution_SUITE.erl
index d15f6aa0d5..21a96f804a 100644
--- a/lib/kernel/test/erl_distribution_SUITE.erl
+++ b/lib/kernel/test/erl_distribution_SUITE.erl
@@ -273,6 +273,7 @@ tick_change(Config) when is_list(Config) ->
?line PaDir = filename:dirname(code:which(?MODULE)),
?line [BN, CN] = get_nodenames(2, tick_change),
?line DefaultTT = net_kernel:get_net_ticktime(),
+ ?line unchanged = net_kernel:set_net_ticktime(DefaultTT, 60),
?line case DefaultTT of
I when is_integer(I) -> ?line ok;
_ -> ?line ?t:fail(DefaultTT)
@@ -377,6 +378,7 @@ run_tick_change_test(B, C, PrevTT, TT, PaDir) ->
end,
?line change_initiated = net_kernel:set_net_ticktime(TT,20),
+ ?line {ongoing_change_to,_} = net_kernel:set_net_ticktime(TT,20),
?line sleep(3),
?line change_initiated = rpc:call(B,net_kernel,set_net_ticktime,[TT,15]),
?line sleep(7),
diff --git a/lib/kernel/test/gen_sctp_SUITE.erl b/lib/kernel/test/gen_sctp_SUITE.erl
index fad8c7398b..eb06d4324b 100644
--- a/lib/kernel/test/gen_sctp_SUITE.erl
+++ b/lib/kernel/test/gen_sctp_SUITE.erl
@@ -23,12 +23,16 @@
%%-compile(export_all).
--export([all/1,init_per_testcase/2,fin_per_testcase/2,
- basic/1,api_open_close/1,api_listen/1,api_connect_init/1,
- xfer_min/1,xfer_active/1]).
+-export([all/1,init_per_testcase/2,fin_per_testcase/2]).
+-export(
+ [basic/1,
+ api_open_close/1,api_listen/1,api_connect_init/1,api_opts/1,
+ xfer_min/1,xfer_active/1,def_sndrcvinfo/1]).
all(suite) ->
- [basic,api_open_close,api_listen,api_connect_init,xfer_min,xfer_active].
+ [basic,
+ api_open_close,api_listen,api_connect_init,api_opts,
+ xfer_min,xfer_active,def_sndrcvinfo].
init_per_testcase(_Func, Config) ->
Dog = test_server:timetrap(test_server:seconds(15)),
@@ -39,6 +43,10 @@ fin_per_testcase(_Func, Config) ->
+-define(LOGVAR(Var), begin io:format(??Var" = ~p~n", [Var]) end).
+
+
+
basic(doc) ->
"Hello world";
basic(suite) ->
@@ -214,12 +222,17 @@ xfer_active(Config) when is_list(Config) ->
end,
?line ok = gen_sctp:close(Sb),
?line receive
- {sctp,Sa,Loopback,Pb,
- {[],
- #sctp_assoc_change{state=comm_lost,
- assoc_id=SaAssocId}}} -> ok
- after 17 -> ok %% On Solaris this does not arrive
- end,
+ {sctp,Sa,Loopback,Pb,
+ {[],
+ #sctp_assoc_change{state=comm_lost,
+ assoc_id=SaAssocId}}} -> ok
+ after Timeout ->
+ ?line test_server:fail({unexpected,flush()})
+ end,
+ ?line receive
+ {sctp_error,Sa,enotconn} -> ok % Solaris
+ after 17 -> ok %% Only happens on Solaris
+ end,
?line ok = gen_sctp:close(Sa),
%%
?line receive
@@ -228,6 +241,148 @@ xfer_active(Config) when is_list(Config) ->
end,
ok.
+def_sndrcvinfo(doc) ->
+ "Test that #sctp_sndrcvinfo{} parameters set on a socket "
+ "are used by gen_sctp:send/4";
+def_sndrcvinfo(suite) ->
+ [];
+def_sndrcvinfo(Config) when is_list(Config) ->
+ ?line Loopback = {127,0,0,1},
+ ?line Data = <<"What goes up, must come down.">>,
+ %%
+ ?line S1 =
+ ok(gen_sctp:open(
+ 0, [{sctp_default_send_param,#sctp_sndrcvinfo{ppid=17}}])),
+ ?LOGVAR(S1),
+ ?line P1 =
+ ok(inet:port(S1)),
+ ?LOGVAR(P1),
+ ?line #sctp_sndrcvinfo{ppid=17, context=0, timetolive=0, assoc_id=0} =
+ getopt(S1, sctp_default_send_param),
+ ?line ok =
+ gen_sctp:listen(S1, true),
+ %%
+ ?line S2 =
+ ok(gen_sctp:open()),
+ ?LOGVAR(S2),
+ ?line P2 =
+ ok(inet:port(S2)),
+ ?LOGVAR(P2),
+ ?line #sctp_sndrcvinfo{ppid=0, context=0, timetolive=0, assoc_id=0} =
+ getopt(S2, sctp_default_send_param),
+ %%
+ ?line #sctp_assoc_change{
+ state=comm_up,
+ error=0,
+ assoc_id=S2AssocId} = S2AssocChange =
+ ok(gen_sctp:connect(S2, Loopback, P1, [])),
+ ?LOGVAR(S2AssocChange),
+ ?line case ok(gen_sctp:recv(S1)) of
+ {Loopback, P2,[],
+ #sctp_assoc_change{
+ state=comm_up,
+ error=0,
+ assoc_id=S1AssocId}} ->
+ ?LOGVAR(S1AssocId)
+ end,
+ ?line #sctp_sndrcvinfo{
+ ppid=17, context=0, timetolive=0, assoc_id=S1AssocId} =
+ getopt(
+ S1, sctp_default_send_param, #sctp_sndrcvinfo{assoc_id=S1AssocId}),
+ ?line #sctp_sndrcvinfo{
+ ppid=0, context=0, timetolive=0, assoc_id=S2AssocId} =
+ getopt(
+ S2, sctp_default_send_param, #sctp_sndrcvinfo{assoc_id=S2AssocId}),
+ %%
+ ?line ok =
+ gen_sctp:send(S1, S1AssocId, 1, <<"1: ",Data/binary>>),
+ ?line case ok(gen_sctp:recv(S2)) of
+ {Loopback,P1,
+ [#sctp_sndrcvinfo{
+ stream=1, ppid=17, context=0, assoc_id=S2AssocId}],
+ <<"1: ",Data/binary>>} -> ok
+ end,
+ %%
+ ?line ok =
+ setopt(
+ S1, sctp_default_send_param, #sctp_sndrcvinfo{ppid=18}),
+ ?line ok =
+ setopt(
+ S1, sctp_default_send_param,
+ #sctp_sndrcvinfo{ppid=19, assoc_id=S1AssocId}),
+ ?line #sctp_sndrcvinfo{
+ ppid=18, context=0, timetolive=0, assoc_id=0} =
+ getopt(S1, sctp_default_send_param),
+ ?line #sctp_sndrcvinfo{
+ ppid=19, context=0, timetolive=0, assoc_id=S1AssocId} =
+ getopt(
+ S1, sctp_default_send_param, #sctp_sndrcvinfo{assoc_id=S1AssocId}),
+ %%
+ ?line ok =
+ gen_sctp:send(S1, S1AssocId, 0, <<"2: ",Data/binary>>),
+ ?line case ok(gen_sctp:recv(S2)) of
+ {Loopback,P1,
+ [#sctp_sndrcvinfo{
+ stream=0, ppid=19, context=0, assoc_id=S2AssocId}],
+ <<"2: ",Data/binary>>} -> ok
+ end,
+ ?line ok =
+ gen_sctp:send(S2, S2AssocChange, 1, <<"3: ",Data/binary>>),
+ ?line case ok(gen_sctp:recv(S1)) of
+ {Loopback,P2,
+ [#sctp_sndrcvinfo{
+ stream=1, ppid=0, context=0, assoc_id=S1AssocId}],
+ <<"3: ",Data/binary>>} -> ok;
+ {Loopback,P2,[],
+ #sctp_paddr_change{
+ addr={Loopback,_}, state=addr_available,
+ error=0, assoc_id=S1AssocId}} ->
+ ?line case ok(gen_sctp:recv(S1)) of
+ {Loopback,P2,
+ [#sctp_sndrcvinfo{
+ stream=1, ppid=0, context=0,
+ assoc_id=S1AssocId}],
+ <<"3: ",Data/binary>>} -> ok
+ end
+ end,
+ ?line ok =
+ gen_sctp:send(
+ S2,
+ #sctp_sndrcvinfo{stream=0, ppid=20, assoc_id=S2AssocId},
+ <<"4: ",Data/binary>>),
+ ?line case ok(gen_sctp:recv(S1)) of
+ {Loopback,P2,
+ [#sctp_sndrcvinfo{
+ stream=0, ppid=20, context=0, assoc_id=S1AssocId}],
+ <<"4: ",Data/binary>>} -> ok
+ end,
+ %%
+ ?line ok =
+ gen_sctp:close(S1),
+ ?line ok =
+ gen_sctp:close(S2),
+ ?line receive
+ Msg ->
+ test_server:fail({received,Msg})
+ after 17 -> ok
+ end,
+ ok.
+
+getopt(S, Opt) ->
+ {ok,[{Opt,Val}]} = inet:getopts(S, [Opt]),
+ Val.
+
+getopt(S, Opt, Param) ->
+ {ok,[{Opt,Val}]} = inet:getopts(S, [{Opt,Param}]),
+ Val.
+
+setopt(S, Opt, Val) ->
+ inet:setopts(S, [{Opt,Val}]).
+
+ok({ok,X}) ->
+ io:format("OK: ~p~n", [X]),
+ X.
+
flush() ->
receive
Msg ->
@@ -382,3 +537,17 @@ api_connect_init(Config) when is_list(Config) ->
?line ok = gen_sctp:close(Sa),
?line ok = gen_sctp:close(Sb),
ok.
+
+api_opts(doc) ->
+ "Test socket options";
+api_opts(suite) ->
+ [];
+api_opts(Config) when is_list(Config) ->
+ ?line {ok,S} = gen_sctp:open(0),
+ ?line OSType = os:type(),
+ ?line case {inet:setopts(S, [{linger,{true,2}}]),OSType} of
+ {ok,_} ->
+ ok;
+ {{error,einval},{unix,sunos}} ->
+ ok
+ end.
diff --git a/lib/kernel/vsn.mk b/lib/kernel/vsn.mk
index 9a191f9aeb..651d082379 100644
--- a/lib/kernel/vsn.mk
+++ b/lib/kernel/vsn.mk
@@ -1,20 +1 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2010. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-#
-
KERNEL_VSN = 2.14.1
diff --git a/lib/megaco/vsn.mk b/lib/megaco/vsn.mk
index f28c89abbe..73ac5bbc63 100644
--- a/lib/megaco/vsn.mk
+++ b/lib/megaco/vsn.mk
@@ -1,22 +1,3 @@
-#-*-makefile-*- ; force emacs to enter makefile-mode
-
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2001-2010. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-
APPLICATION = megaco
MEGACO_VSN = 3.14.1.1
PRE_VSN =
diff --git a/lib/public_key/test/Makefile b/lib/public_key/test/Makefile
index 5544339ff2..e20b903942 100644
--- a/lib/public_key/test/Makefile
+++ b/lib/public_key/test/Makefile
@@ -28,7 +28,7 @@ INCLUDES= -I. -I ../include
# ----------------------------------------------------
MODULES= \
- pkey_test \
+ erl_make_certs \
public_key_SUITE \
pkits_SUITE
diff --git a/lib/public_key/test/pkey_test.erl b/lib/public_key/test/erl_make_certs.erl
index deb4defd29..e31e5552d3 100644
--- a/lib/public_key/test/pkey_test.erl
+++ b/lib/public_key/test/erl_make_certs.erl
@@ -19,7 +19,7 @@
%% Create test certificates
--module(pkey_test).
+-module(erl_make_certs).
-include_lib("public_key/include/public_key.hrl").
-export([make_cert/1, gen_rsa/1, verify_signature/3, write_pem/3]).
@@ -144,34 +144,39 @@ encode_key(Key = #'DSAPrivateKey'{}) ->
make_tbs(SubjectKey, Opts) ->
Version = list_to_atom("v"++integer_to_list(proplists:get_value(version, Opts, 3))),
- {Issuer, IssuerKey} = issuer(Opts, SubjectKey),
+
+ IssuerProp = proplists:get_value(issuer, Opts, true),
+ {Issuer, IssuerKey} = issuer(IssuerProp, Opts, SubjectKey),
{Algo, Parameters} = sign_algorithm(IssuerKey, Opts),
SignAlgo = #'SignatureAlgorithm'{algorithm = Algo,
parameters = Parameters},
-
+ Subject = case IssuerProp of
+ true -> %% Is a Root Ca
+ Issuer;
+ _ ->
+ subject(proplists:get_value(subject, Opts),false)
+ end,
+
{#'OTPTBSCertificate'{serialNumber = trunc(random:uniform()*100000000)*10000 + 1,
signature = SignAlgo,
issuer = Issuer,
validity = validity(Opts),
- subject = subject(proplists:get_value(subject, Opts),false),
+ subject = Subject,
subjectPublicKeyInfo = publickey(SubjectKey),
version = Version,
extensions = extensions(Opts)
}, IssuerKey}.
-issuer(Opts, SubjectKey) ->
- IssuerProp = proplists:get_value(issuer, Opts, true),
- case IssuerProp of
- true -> %% Self signed
- {subject(proplists:get_value(subject, Opts), true), SubjectKey};
- {Issuer, IssuerKey} when is_binary(Issuer) ->
- {issuer_der(Issuer), decode_key(IssuerKey)};
- {File, IssuerKey} when is_list(File) ->
- {ok, [{cert, Cert, _}|_]} = public_key:pem_to_der(File),
- {issuer_der(Cert), decode_key(IssuerKey)}
- end.
+issuer(true, Opts, SubjectKey) ->
+ %% Self signed
+ {subject(proplists:get_value(subject, Opts), true), SubjectKey};
+issuer({Issuer, IssuerKey}, _Opts, _SubjectKey) when is_binary(Issuer) ->
+ {issuer_der(Issuer), decode_key(IssuerKey)};
+issuer({File, IssuerKey}, _Opts, _SubjectKey) when is_list(File) ->
+ {ok, [{cert, Cert, _}|_]} = public_key:pem_to_der(File),
+ {issuer_der(Cert), decode_key(IssuerKey)}.
issuer_der(Issuer) ->
Decoded = public_key:pkix_decode_cert(Issuer, otp),
@@ -179,8 +184,8 @@ issuer_der(Issuer) ->
#'OTPTBSCertificate'{subject=Subject} = Tbs,
Subject.
-subject(undefined, IsCA) ->
- User = if IsCA -> "CA"; true -> os:getenv("USER") end,
+subject(undefined, IsRootCA) ->
+ User = if IsRootCA -> "RootCA"; true -> os:getenv("USER") end,
Opts = [{email, User ++ "@erlang.org"},
{name, User},
{city, "Stockholm"},
@@ -267,7 +272,7 @@ publickey(#'DSAPrivateKey'{p=P, q=Q, g=G, y=Y}) ->
#'OTPSubjectPublicKeyInfo'{algorithm = Algo, subjectPublicKey = Y}.
validity(Opts) ->
- DefFrom0 = date(),
+ DefFrom0 = calendar:gregorian_days_to_date(calendar:date_to_gregorian_days(date())-1),
DefTo0 = calendar:gregorian_days_to_date(calendar:date_to_gregorian_days(date())+7),
{DefFrom, DefTo} = proplists:get_value(validity, Opts, {DefFrom0, DefTo0}),
Format = fun({Y,M,D}) -> lists:flatten(io_lib:format("~w~2..0w~2..0w000000Z",[Y,M,D])) end,
diff --git a/lib/public_key/test/pkits_SUITE.erl b/lib/public_key/test/pkits_SUITE.erl
index cd7b2d77db..1d75e1aed2 100644
--- a/lib/public_key/test/pkits_SUITE.erl
+++ b/lib/public_key/test/pkits_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -187,7 +187,7 @@ run([],_) -> ok.
read_certs(Test) ->
File = test_file(Test),
%% io:format("Read ~p ",[File]),
- Ders = pkey_test:pem_to_der(File),
+ Ders = erl_make_certs:pem_to_der(File),
%% io:format("Ders ~p ~n",[length(Ders)]),
[Cert || {'Certificate', Cert, not_encrypted} <- Ders].
diff --git a/lib/public_key/test/public_key_SUITE.erl b/lib/public_key/test/public_key_SUITE.erl
index ee5e939476..09235ff460 100644
--- a/lib/public_key/test/public_key_SUITE.erl
+++ b/lib/public_key/test/public_key_SUITE.erl
@@ -131,36 +131,36 @@ pk_decode_encode(Config) when is_list(Config) ->
Datadir = ?config(data_dir, Config),
[{'DSAPrivateKey', DerDSAKey, not_encrypted} = Entry0 ] =
- pkey_test:pem_to_der(filename:join(Datadir, "dsa.pem")),
+ erl_make_certs:pem_to_der(filename:join(Datadir, "dsa.pem")),
DSAKey = public_key:der_decode('DSAPrivateKey', DerDSAKey),
DSAKey = public_key:pem_entry_decode(Entry0),
[{'RSAPrivateKey', DerRSAKey, not_encrypted} = Entry1 ] =
- pkey_test:pem_to_der(filename:join(Datadir, "client_key.pem")),
+ erl_make_certs:pem_to_der(filename:join(Datadir, "client_key.pem")),
RSAKey0 = public_key:der_decode('RSAPrivateKey', DerRSAKey),
RSAKey0 = public_key:pem_entry_decode(Entry1),
[{'RSAPrivateKey', _, {_,_}} = Entry2] =
- pkey_test:pem_to_der(filename:join(Datadir, "rsa.pem")),
+ erl_make_certs:pem_to_der(filename:join(Datadir, "rsa.pem")),
true = check_entry_type(public_key:pem_entry_decode(Entry2, "abcd1234"),
'RSAPrivateKey'),
Salt0 = crypto:rand_bytes(8),
Entry3 = public_key:pem_entry_encode('RSAPrivateKey', RSAKey0,
- {{"DES-EDE3-CBC", Salt0}, "1234abcd"}),
+ {{"DES-EDE3-CBC", Salt0}, "1234abcd"}),
RSAKey0 = public_key:pem_entry_decode(Entry3,"1234abcd"),
Des3KeyFile = filename:join(Datadir, "des3_client_key.pem"),
- pkey_test:der_to_pem(Des3KeyFile, [Entry3]),
+ erl_make_certs:der_to_pem(Des3KeyFile, [Entry3]),
- [{'RSAPrivateKey', _, {"DES-EDE3-CBC", Salt0}}] = pkey_test:pem_to_der(Des3KeyFile),
+ [{'RSAPrivateKey', _, {"DES-EDE3-CBC", Salt0}}] = erl_make_certs:pem_to_der(Des3KeyFile),
Salt1 = crypto:rand_bytes(8),
Entry4 = public_key:pem_entry_encode('RSAPrivateKey', RSAKey0,
@@ -169,18 +169,18 @@ pk_decode_encode(Config) when is_list(Config) ->
DesKeyFile = filename:join(Datadir, "des_client_key.pem"),
- pkey_test:der_to_pem(DesKeyFile, [Entry4]),
+ erl_make_certs:der_to_pem(DesKeyFile, [Entry4]),
- [{'RSAPrivateKey', _, {"DES-CBC", Salt1}} =Entry5] = pkey_test:pem_to_der(DesKeyFile),
+ [{'RSAPrivateKey', _, {"DES-CBC", Salt1}} =Entry5] = erl_make_certs:pem_to_der(DesKeyFile),
true = check_entry_type(public_key:pem_entry_decode(Entry5, "4567efgh"),
'RSAPrivateKey'),
[{'DHParameter', DerDH, not_encrypted} = Entry6] =
- pkey_test:pem_to_der(filename:join(Datadir, "dh.pem")),
+ erl_make_certs:pem_to_der(filename:join(Datadir, "dh.pem")),
- pkey_test:der_to_pem(filename:join(Datadir, "new_dh.pem"), [Entry6]),
+ erl_make_certs:der_to_pem(filename:join(Datadir, "new_dh.pem"), [Entry6]),
DHParameter = public_key:der_decode('DHParameter', DerDH),
DHParameter = public_key:pem_entry_decode(Entry6),
@@ -188,22 +188,22 @@ pk_decode_encode(Config) when is_list(Config) ->
Entry6 = public_key:pem_entry_encode('DHParameter', DHParameter),
[{'Certificate', DerCert, not_encrypted} = Entry7] =
- pkey_test:pem_to_der(filename:join(Datadir, "client_cert.pem")),
+ erl_make_certs:pem_to_der(filename:join(Datadir, "client_cert.pem")),
Cert = public_key:der_decode('Certificate', DerCert),
Cert = public_key:pem_entry_decode(Entry7),
CertEntries = [{'Certificate', _, not_encrypted} = CertEntry0,
{'Certificate', _, not_encrypted} = CertEntry1] =
- pkey_test:pem_to_der(filename:join(Datadir, "cacerts.pem")),
+ erl_make_certs:pem_to_der(filename:join(Datadir, "cacerts.pem")),
- ok = pkey_test:der_to_pem(filename:join(Datadir, "wcacerts.pem"), CertEntries),
- ok = pkey_test:der_to_pem(filename:join(Datadir, "wdsa.pem"), [Entry0]),
+ ok = erl_make_certs:der_to_pem(filename:join(Datadir, "wcacerts.pem"), CertEntries),
+ ok = erl_make_certs:der_to_pem(filename:join(Datadir, "wdsa.pem"), [Entry0]),
- NewCertEntries = pkey_test:pem_to_der(filename:join(Datadir, "wcacerts.pem")),
+ NewCertEntries = erl_make_certs:pem_to_der(filename:join(Datadir, "wcacerts.pem")),
true = lists:member(CertEntry0, NewCertEntries),
true = lists:member(CertEntry1, NewCertEntries),
- [Entry0] = pkey_test:pem_to_der(filename:join(Datadir, "wdsa.pem")),
+ [Entry0] = erl_make_certs:pem_to_der(filename:join(Datadir, "wdsa.pem")),
ok.
%%--------------------------------------------------------------------
@@ -212,7 +212,7 @@ encrypt_decrypt(doc) ->
encrypt_decrypt(suite) ->
[];
encrypt_decrypt(Config) when is_list(Config) ->
- {PrivateKey, _DerKey} = pkey_test:gen_rsa(64),
+ {PrivateKey, _DerKey} = erl_make_certs:gen_rsa(64),
#'RSAPrivateKey'{modulus=Mod, publicExponent=Exp} = PrivateKey,
PublicKey = #'RSAPublicKey'{modulus=Mod, publicExponent=Exp},
Msg = list_to_binary(lists:duplicate(5, "Foo bar 100")),
@@ -233,16 +233,16 @@ sign_verify(suite) ->
[];
sign_verify(Config) when is_list(Config) ->
%% Make cert signs and validates the signature using RSA and DSA
- Ca = {_, CaKey} = pkey_test:make_cert([]),
+ Ca = {_, CaKey} = erl_make_certs:make_cert([]),
PrivateRSA = #'RSAPrivateKey'{modulus=Mod, publicExponent=Exp} =
public_key:pem_entry_decode(CaKey),
- CertInfo = {Cert1,CertKey1} = pkey_test:make_cert([{key, dsa}, {issuer, Ca}]),
+ CertInfo = {Cert1,CertKey1} = erl_make_certs:make_cert([{key, dsa}, {issuer, Ca}]),
PublicRSA = #'RSAPublicKey'{modulus=Mod, publicExponent=Exp},
true = public_key:pkix_verify(Cert1, PublicRSA),
- {Cert2,_CertKey} = pkey_test:make_cert([{issuer, CertInfo}]),
+ {Cert2,_CertKey} = erl_make_certs:make_cert([{issuer, CertInfo}]),
#'DSAPrivateKey'{p=P, q=Q, g=G, y=Y, x=_X} =
public_key:pem_entry_decode(CertKey1),
@@ -264,7 +264,7 @@ sign_verify(Config) when is_list(Config) ->
%% DSA sign
Datadir = ?config(data_dir, Config),
[DsaKey = {'DSAPrivateKey', _, _}] =
- pkey_test:pem_to_der(filename:join(Datadir, "dsa.pem")),
+ erl_make_certs:pem_to_der(filename:join(Datadir, "dsa.pem")),
DSAPrivateKey = public_key:pem_entry_decode(DsaKey),
#'DSAPrivateKey'{p=P1, q=Q1, g=G1, y=Y1, x=_X1} = DSAPrivateKey,
DSASign = public_key:sign(Msg, sha, DSAPrivateKey),
@@ -293,8 +293,8 @@ pkix(suite) ->
[];
pkix(Config) when is_list(Config) ->
Datadir = ?config(data_dir, Config),
- Certs0 = pkey_test:pem_to_der(filename:join(Datadir, "cacerts.pem")),
- Certs1 = pkey_test:pem_to_der(filename:join(Datadir, "client_cert.pem")),
+ Certs0 = erl_make_certs:pem_to_der(filename:join(Datadir, "cacerts.pem")),
+ Certs1 = erl_make_certs:pem_to_der(filename:join(Datadir, "client_cert.pem")),
TestTransform = fun({'Certificate', CertDer, not_encrypted}) ->
PlainCert = public_key:pkix_decode_cert(CertDer, plain),
OtpCert = public_key:pkix_decode_cert(CertDer, otp),
@@ -340,7 +340,7 @@ pkix_path_validation(suite) ->
[];
pkix_path_validation(Config) when is_list(Config) ->
CaK = {Trusted,_} =
- pkey_test:make_cert([{key, dsa},
+ erl_make_certs:make_cert([{key, dsa},
{subject, [
{name, "Public Key"},
{?'id-at-name', {printableString, "public_key"}},
@@ -351,12 +351,12 @@ pkix_path_validation(Config) when is_list(Config) ->
{org_unit, "testing dep"}
]}
]),
- ok = pkey_test:write_pem("./", "public_key_cacert", CaK),
+ ok = erl_make_certs:write_pem("./", "public_key_cacert", CaK),
- CertK1 = {Cert1, _} = pkey_test:make_cert([{issuer, CaK}]),
- CertK2 = {Cert2,_} = pkey_test:make_cert([{issuer, CertK1},
+ CertK1 = {Cert1, _} = erl_make_certs:make_cert([{issuer, CaK}]),
+ CertK2 = {Cert2,_} = erl_make_certs:make_cert([{issuer, CertK1},
{digest, md5}, {extensions, false}]),
- ok = pkey_test:write_pem("./", "public_key_cert", CertK2),
+ ok = erl_make_certs:write_pem("./", "public_key_cert", CertK2),
{ok, _} = public_key:pkix_path_validation(Trusted, [Cert1], []),
@@ -366,9 +366,9 @@ pkix_path_validation(Config) when is_list(Config) ->
{ok, _} = public_key:pkix_path_validation(Trusted, [Cert1, Cert2], []),
{error, issuer_not_found} = public_key:pkix_issuer_id(Cert2, other),
- CertK3 = {Cert3,_} = pkey_test:make_cert([{issuer, CertK1},
+ CertK3 = {Cert3,_} = erl_make_certs:make_cert([{issuer, CertK1},
{extensions, [{basic_constraints, false}]}]),
- {Cert4,_} = pkey_test:make_cert([{issuer, CertK3}]),
+ {Cert4,_} = erl_make_certs:make_cert([{issuer, CertK3}]),
{error, E={bad_cert,missing_basic_constraint}} =
public_key:pkix_path_validation(Trusted, [Cert1, Cert3,Cert4], []),
diff --git a/lib/reltool/vsn.mk b/lib/reltool/vsn.mk
index 7bee91d428..9e0bce1d01 100644
--- a/lib/reltool/vsn.mk
+++ b/lib/reltool/vsn.mk
@@ -1,19 +1 @@
-# This is an -*-makefile-*- file.
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2009-2010. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-
RELTOOL_VSN = 0.5.4
diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk
index 21b84f0dc6..95103433a4 100644
--- a/lib/snmp/vsn.mk
+++ b/lib/snmp/vsn.mk
@@ -1,22 +1,3 @@
-#-*-makefile-*- ; force emacs to enter makefile-mode
-
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2010. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-
SNMP_VSN = 4.17.1
PRE_VSN =
APP_VSN = "snmp-$(SNMP_VSN)$(PRE_VSN)"
diff --git a/lib/ssl/vsn.mk b/lib/ssl/vsn.mk
index 6c40a4529c..709a089892 100644
--- a/lib/ssl/vsn.mk
+++ b/lib/ssl/vsn.mk
@@ -1,20 +1 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1999-2010. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-#
-
SSL_VSN = 4.0.1
diff --git a/lib/stdlib/vsn.mk b/lib/stdlib/vsn.mk
index 02ea6d9d68..1757d35160 100644
--- a/lib/stdlib/vsn.mk
+++ b/lib/stdlib/vsn.mk
@@ -1,20 +1 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2010. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-#
-
STDLIB_VSN = 1.17.1
diff --git a/lib/tools/vsn.mk b/lib/tools/vsn.mk
index abe9a804f0..7a6f8c92a2 100644
--- a/lib/tools/vsn.mk
+++ b/lib/tools/vsn.mk
@@ -1,19 +1 @@
-# This is an -*-makefile-*- file.
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2010. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-
TOOLS_VSN = 2.6.6
diff --git a/lib/tv/vsn.mk b/lib/tv/vsn.mk
index 93973489bc..d344c676a3 100644
--- a/lib/tv/vsn.mk
+++ b/lib/tv/vsn.mk
@@ -1,20 +1 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2010. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-#
-
TV_VSN = 2.1.4.5
diff --git a/lib/xmerl/vsn.mk b/lib/xmerl/vsn.mk
index 2239604b59..03d16ad6fe 100644
--- a/lib/xmerl/vsn.mk
+++ b/lib/xmerl/vsn.mk
@@ -1,20 +1 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2003-2010. All Rights Reserved.
-#
-# The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved online at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# %CopyrightEnd%
-#
-
XMERL_VSN = 1.2.5