equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
47 */ |
47 */ |
48 @Deprecated(since="1.2", forRemoval=true) |
48 @Deprecated(since="1.2", forRemoval=true) |
49 @SuppressWarnings("removal") |
49 @SuppressWarnings("removal") |
50 public abstract class Signer extends Identity { |
50 public abstract class Signer extends Identity { |
51 |
51 |
|
52 @java.io.Serial |
52 private static final long serialVersionUID = -1763464102261361480L; |
53 private static final long serialVersionUID = -1763464102261361480L; |
53 |
54 |
54 /** |
55 /** |
55 * The signer's private key. |
56 * The signer's private key. |
56 * |
57 * |
81 * |
82 * |
82 * @param name the identity name. |
83 * @param name the identity name. |
83 * |
84 * |
84 * @param scope the scope of the identity. |
85 * @param scope the scope of the identity. |
85 * |
86 * |
86 * @exception KeyManagementException if there is already an identity |
87 * @throws KeyManagementException if there is already an identity |
87 * with the same name in the scope. |
88 * with the same name in the scope. |
88 */ |
89 */ |
89 public Signer(String name, IdentityScope scope) |
90 public Signer(String name, IdentityScope scope) |
90 throws KeyManagementException { |
91 throws KeyManagementException { |
91 super(name, scope); |
92 super(name, scope); |
99 * as its argument to see if it's ok to return the private key. |
100 * as its argument to see if it's ok to return the private key. |
100 * |
101 * |
101 * @return this signer's private key, or null if the private key has |
102 * @return this signer's private key, or null if the private key has |
102 * not yet been set. |
103 * not yet been set. |
103 * |
104 * |
104 * @exception SecurityException if a security manager exists and its |
105 * @throws SecurityException if a security manager exists and its |
105 * {@code checkSecurityAccess} method doesn't allow |
106 * {@code checkSecurityAccess} method doesn't allow |
106 * returning the private key. |
107 * returning the private key. |
107 * |
108 * |
108 * @see SecurityManager#checkSecurityAccess |
109 * @see SecurityManager#checkSecurityAccess |
109 */ |
110 */ |
119 * method is called with {@code "setSignerKeyPair"} |
120 * method is called with {@code "setSignerKeyPair"} |
120 * as its argument to see if it's ok to set the key pair. |
121 * as its argument to see if it's ok to set the key pair. |
121 * |
122 * |
122 * @param pair an initialized key pair. |
123 * @param pair an initialized key pair. |
123 * |
124 * |
124 * @exception InvalidParameterException if the key pair is not |
125 * @throws InvalidParameterException if the key pair is not |
125 * properly initialized. |
126 * properly initialized. |
126 * @exception KeyException if the key pair cannot be set for any |
127 * @throws KeyException if the key pair cannot be set for any |
127 * other reason. |
128 * other reason. |
128 * @exception SecurityException if a security manager exists and its |
129 * @throws SecurityException if a security manager exists and its |
129 * {@code checkSecurityAccess} method doesn't allow |
130 * {@code checkSecurityAccess} method doesn't allow |
130 * setting the key pair. |
131 * setting the key pair. |
131 * |
132 * |
132 * @see SecurityManager#checkSecurityAccess |
133 * @see SecurityManager#checkSecurityAccess |
133 */ |
134 */ |