Skip to content

Commit 2e07877

Browse files
committed
adjusted licensing terms to LGPL 2.1
1 parent 34f9ea4 commit 2e07877

22 files changed

+864
-176
lines changed

COPYING

Lines changed: 458 additions & 0 deletions
Large diffs are not rendered by default.

Makefile.am

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
#
2+
# pkcs11shim : a PKCS#11 shim library
3+
#
4+
# This work is based upon OpenSC pkcs11spy (https://github.com/OpenSC/OpenSC.git)
5+
#
6+
# Copyright (C) 2020 Mastercard
7+
#
8+
# This library is free software; you can redistribute it and/or
9+
# modify it under the terms of the GNU Lesser General Public
10+
# License as published by the Free Software Foundation; either
11+
# version 2.1 of the License, or (at your option) any later version.
12+
#
13+
# This library is distributed in the hope that it will be useful,
14+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16+
# Lesser General Public License for more details.
17+
#
18+
# You should have received a copy of the GNU Lesser General Public
19+
# License along with this library; if not, write to the Free Software
20+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21+
#
22+
123
ACLOCAL_AMFLAGS = -I m4
224

325
SUBDIRS = src

bootstrap.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# pkcs11shim : a PKCS#11 shim library
5+
#
6+
# This work is based upon OpenSC pkcs11spy (https://github.com/OpenSC/OpenSC.git)
7+
#
8+
# Copyright (C) 2020 Mastercard
9+
#
10+
# This library is free software; you can redistribute it and/or
11+
# modify it under the terms of the GNU Lesser General Public
12+
# License as published by the Free Software Foundation; either
13+
# version 2.1 of the License, or (at your option) any later version.
14+
#
15+
# This library is distributed in the hope that it will be useful,
16+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18+
# Lesser General Public License for more details.
19+
#
20+
# You should have received a copy of the GNU Lesser General Public
21+
# License along with this library; if not, write to the Free Software
22+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23+
#
24+
325
# pull submodule stuff
426
git submodule update --init include/cryptoki
527

628
# create configure scripts
729
autoreconf -vfi
8-

configure.ac

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
# -*- Autoconf -*-
22
# Process this file with autoconf to produce a configure script.
33

4+
#
5+
# pkcs11shim : a PKCS#11 shim library
6+
#
7+
# This work is based upon OpenSC pkcs11spy (https://github.com/OpenSC/OpenSC.git)
8+
#
9+
# Copyright (C) 2020 Mastercard
10+
#
11+
# This library is free software; you can redistribute it and/or
12+
# modify it under the terms of the GNU Lesser General Public
13+
# License as published by the Free Software Foundation; either
14+
# version 2.1 of the License, or (at your option) any later version.
15+
#
16+
# This library is distributed in the hope that it will be useful,
17+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19+
# Lesser General Public License for more details.
20+
#
21+
# You should have received a copy of the GNU Lesser General Public
22+
# License along with this library; if not, write to the Free Software
23+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24+
#
25+
426

527
#
6-
# Note: autoconf-archive must be present
28+
# Note: autoconf-archive must be installed on your system
729
#
830

931
AC_PREREQ([2.69])

include/cryptoki.h

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/* -*- mode: c; c-file-style:"stroustrup"; -*- */
2+
3+
/*
4+
* Copyright (c) 2021 Mastercard
5+
*
6+
* This library is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 2.1 of the License, or (at your option) any later version.
10+
*
11+
* This library is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public
17+
* License along with this library; if not, write to the Free Software
18+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19+
*/
20+
121
#ifndef _CRYPTOKI_H_
222
#define _CRYPTOKI_H_ 1
323

@@ -19,4 +39,3 @@
1939
#include "pkcs11.h" /* include from OASIS submodule */
2040

2141
#endif /* _CRYPTOKI_H_ */
22-

src/Makefile.am

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
#
2+
# pkcs11shim : a PKCS#11 shim library
3+
#
4+
# This work is based upon OpenSC pkcs11spy (https://github.com/OpenSC/OpenSC.git)
5+
#
6+
# Copyright (C) 2020 Mastercard
7+
#
8+
# This library is free software; you can redistribute it and/or
9+
# modify it under the terms of the GNU Lesser General Public
10+
# License as published by the Free Software Foundation; either
11+
# version 2.1 of the License, or (at your option) any later version.
12+
#
13+
# This library is distributed in the hope that it will be useful,
14+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16+
# Lesser General Public License for more details.
17+
#
18+
# You should have received a copy of the GNU Lesser General Public
19+
# License along with this library; if not, write to the Free Software
20+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21+
#
22+
123
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/cryptoki/published/3-00-errata-1
224

325
MAINTAINERCLEANFILES = Makefile.in

src/atfork.c

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
/* -*- mode: c; c-file-style:"stroustrup"; -*- */
22

33
/*
4-
* Copyright (c) 2021 Mastercard
4+
* pkcs11shim : a PKCS#11 shim library
55
*
6-
* Licensed under the Apache License, Version 2.0 (the "License");
7-
* you may not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
6+
* This work is based upon OpenSC pkcs11spy (https://github.com/OpenSC/OpenSC.git)
97
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* Copyright (C) 2020 Mastercard
119
*
12-
* Unless required by applicable law or agreed to in writing, software
13-
* distributed under the License is distributed on an "AS IS" BASIS,
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15-
* See the License for the specific language governing permissions and
16-
* limitations under the License.
10+
* This library is free software; you can redistribute it and/or
11+
* modify it under the terms of the GNU Lesser General Public
12+
* License as published by the Free Software Foundation; either
13+
* version 2.1 of the License, or (at your option) any later version.
14+
*
15+
* This library is distributed in the hope that it will be useful,
16+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18+
* Lesser General Public License for more details.
19+
*
20+
* You should have received a copy of the GNU Lesser General Public
21+
* License along with this library; if not, write to the Free Software
22+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1723
*/
1824

1925
/* handlers for resetting threads & other mutexes after a fork */
@@ -53,7 +59,7 @@ static void shim_atfork_child(void)
5359
shim_config_set_pids(); /* reset tracked PID and PPID */
5460
shim_config_set_output(true); /* reset output file descriptor */
5561
shim_config_logfile_prolog(false); /* add banner */
56-
62+
5763
if(shim_is_printing_deferred()) {
5864
deferred_revive_thread();
5965
deferred_unlock_queue();
@@ -64,7 +70,7 @@ static void shim_atfork_child(void)
6470
void atfork_register_handlers()
6571
{
6672
pthread_atfork(shim_atfork_prepare, shim_atfork_parent, shim_atfork_child);
67-
}
73+
}
6874

6975

7076
/* EOF */

src/atfork.h

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
/* -*- mode: c; c-file-style:"stroustrup"; -*- */
22

33
/*
4-
* Copyright (c) 2021 Mastercard
4+
* pkcs11shim : a PKCS#11 shim library
55
*
6-
* Licensed under the Apache License, Version 2.0 (the "License");
7-
* you may not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
6+
* This work is based upon OpenSC pkcs11spy (https://github.com/OpenSC/OpenSC.git)
97
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* Copyright (C) 2020 Mastercard
119
*
12-
* Unless required by applicable law or agreed to in writing, software
13-
* distributed under the License is distributed on an "AS IS" BASIS,
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15-
* See the License for the specific language governing permissions and
16-
* limitations under the License.
10+
* This library is free software; you can redistribute it and/or
11+
* modify it under the terms of the GNU Lesser General Public
12+
* License as published by the Free Software Foundation; either
13+
* version 2.1 of the License, or (at your option) any later version.
14+
*
15+
* This library is distributed in the hope that it will be useful,
16+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18+
* Lesser General Public License for more details.
19+
*
20+
* You should have received a copy of the GNU Lesser General Public
21+
* License along with this library; if not, write to the Free Software
22+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1723
*/
1824

1925
#if !defined (_ATFORK_H_)

src/deferred-printf.c

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
/* -*- mode: c; c-file-style:"stroustrup"; -*- */
22

33
/*
4-
* Copyright (c) 2021 Mastercard
4+
* pkcs11shim : a PKCS#11 shim library
55
*
6-
* Licensed under the Apache License, Version 2.0 (the "License");
7-
* you may not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
6+
* This work is based upon OpenSC pkcs11spy (https://github.com/OpenSC/OpenSC.git)
97
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* Copyright (C) 2020 Mastercard
119
*
12-
* Unless required by applicable law or agreed to in writing, software
13-
* distributed under the License is distributed on an "AS IS" BASIS,
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15-
* See the License for the specific language governing permissions and
16-
* limitations under the License.
10+
* This library is free software; you can redistribute it and/or
11+
* modify it under the terms of the GNU Lesser General Public
12+
* License as published by the Free Software Foundation; either
13+
* version 2.1 of the License, or (at your option) any later version.
14+
*
15+
* This library is distributed in the hope that it will be useful,
16+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18+
* Lesser General Public License for more details.
19+
*
20+
* You should have received a copy of the GNU Lesser General Public
21+
* License along with this library; if not, write to the Free Software
22+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1723
*/
1824

19-
/* queue processor algorithm from https://stackoverflow.com/a/4577987/979318 */
2025

2126
#include <stdlib.h>
2227
#include <stdio.h>
@@ -257,7 +262,7 @@ void deferred_revive_thread(void)
257262

258263
if(deferred_init_once_rv==0 && deferred_enabled==true) {
259264

260-
/* first cleanup deferred_log_queue. We can as no other thread is accessing this */
265+
/* first cleanup deferred_log_queue. We can as no other thread is accessing this */
261266
thread_queue_cleanup(&deferred_log_queue, 1, true);
262267

263268
/* second: any key-speficic data is rendered invalid - since calling thread is different */
@@ -272,6 +277,6 @@ void deferred_revive_thread(void)
272277
/* atexit(deferred_atexit_handler); */
273278
}
274279
}
275-
280+
276281
}
277282
/* EOF */

src/deferred-printf.h

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
/* -*- mode: c; c-file-style:"stroustrup"; -*- */
22

33
/*
4-
* Copyright (c) 2021 Mastercard
4+
* pkcs11shim : a PKCS#11 shim library
55
*
6-
* Licensed under the Apache License, Version 2.0 (the "License");
7-
* you may not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
6+
* This work is based upon OpenSC pkcs11spy (https://github.com/OpenSC/OpenSC.git)
97
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* Copyright (C) 2020 Mastercard
119
*
12-
* Unless required by applicable law or agreed to in writing, software
13-
* distributed under the License is distributed on an "AS IS" BASIS,
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15-
* See the License for the specific language governing permissions and
16-
* limitations under the License.
10+
* This library is free software; you can redistribute it and/or
11+
* modify it under the terms of the GNU Lesser General Public
12+
* License as published by the Free Software Foundation; either
13+
* version 2.1 of the License, or (at your option) any later version.
14+
*
15+
* This library is distributed in the hope that it will be useful,
16+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18+
* Lesser General Public License for more details.
19+
*
20+
* You should have received a copy of the GNU Lesser General Public
21+
* License along with this library; if not, write to the Free Software
22+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1723
*/
1824

25+
1926
#if !defined(_DEFERRED_PRINTF_H_)
2027
#define _DEFERRED_PRINTF_H_
2128

0 commit comments

Comments
 (0)