001 /*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License"). You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at
010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 * Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 * Copyright 2008 Sun Microsystems, Inc.
026 */
027 package org.opends.server.admin.std.meta;
028
029
030
031 import java.util.Collection;
032 import java.util.SortedSet;
033 import org.opends.server.admin.AdministratorAction;
034 import org.opends.server.admin.AliasDefaultBehaviorProvider;
035 import org.opends.server.admin.BooleanPropertyDefinition;
036 import org.opends.server.admin.client.AuthorizationException;
037 import org.opends.server.admin.client.CommunicationException;
038 import org.opends.server.admin.client.ConcurrentModificationException;
039 import org.opends.server.admin.client.ManagedObject;
040 import org.opends.server.admin.client.MissingMandatoryPropertiesException;
041 import org.opends.server.admin.client.OperationRejectedException;
042 import org.opends.server.admin.DefaultBehaviorProvider;
043 import org.opends.server.admin.DefinedDefaultBehaviorProvider;
044 import org.opends.server.admin.IntegerPropertyDefinition;
045 import org.opends.server.admin.ManagedObjectAlreadyExistsException;
046 import org.opends.server.admin.ManagedObjectDefinition;
047 import org.opends.server.admin.PropertyOption;
048 import org.opends.server.admin.PropertyProvider;
049 import org.opends.server.admin.server.ConfigurationChangeListener;
050 import org.opends.server.admin.server.ServerManagedObject;
051 import org.opends.server.admin.std.client.CryptoManagerCfgClient;
052 import org.opends.server.admin.std.server.CryptoManagerCfg;
053 import org.opends.server.admin.StringPropertyDefinition;
054 import org.opends.server.admin.Tag;
055 import org.opends.server.admin.TopCfgDefn;
056 import org.opends.server.types.DN;
057
058
059
060 /**
061 * An interface for querying the Crypto Manager managed object
062 * definition meta information.
063 * <p>
064 * The Crypto Manager provides a common interface for performing
065 * compression, decompression, hashing, encryption and other kinds of
066 * cryptographic operations.
067 */
068 public final class CryptoManagerCfgDefn extends ManagedObjectDefinition<CryptoManagerCfgClient, CryptoManagerCfg> {
069
070 // The singleton configuration definition instance.
071 private static final CryptoManagerCfgDefn INSTANCE = new CryptoManagerCfgDefn();
072
073
074
075 // The "cipher-key-length" property definition.
076 private static final IntegerPropertyDefinition PD_CIPHER_KEY_LENGTH;
077
078
079
080 // The "cipher-transformation" property definition.
081 private static final StringPropertyDefinition PD_CIPHER_TRANSFORMATION;
082
083
084
085 // The "digest-algorithm" property definition.
086 private static final StringPropertyDefinition PD_DIGEST_ALGORITHM;
087
088
089
090 // The "key-wrapping-transformation" property definition.
091 private static final StringPropertyDefinition PD_KEY_WRAPPING_TRANSFORMATION;
092
093
094
095 // The "mac-algorithm" property definition.
096 private static final StringPropertyDefinition PD_MAC_ALGORITHM;
097
098
099
100 // The "mac-key-length" property definition.
101 private static final IntegerPropertyDefinition PD_MAC_KEY_LENGTH;
102
103
104
105 // The "ssl-cert-nickname" property definition.
106 private static final StringPropertyDefinition PD_SSL_CERT_NICKNAME;
107
108
109
110 // The "ssl-cipher-suite" property definition.
111 private static final StringPropertyDefinition PD_SSL_CIPHER_SUITE;
112
113
114
115 // The "ssl-encryption" property definition.
116 private static final BooleanPropertyDefinition PD_SSL_ENCRYPTION;
117
118
119
120 // The "ssl-protocol" property definition.
121 private static final StringPropertyDefinition PD_SSL_PROTOCOL;
122
123
124
125 // Build the "cipher-key-length" property definition.
126 static {
127 IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "cipher-key-length");
128 builder.setOption(PropertyOption.ADVANCED);
129 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "cipher-key-length"));
130 DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("128");
131 builder.setDefaultBehaviorProvider(provider);
132 PD_CIPHER_KEY_LENGTH = builder.getInstance();
133 INSTANCE.registerPropertyDefinition(PD_CIPHER_KEY_LENGTH);
134 }
135
136
137
138 // Build the "cipher-transformation" property definition.
139 static {
140 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "cipher-transformation");
141 builder.setOption(PropertyOption.ADVANCED);
142 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "cipher-transformation"));
143 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("AES/CBC/PKCS5Padding");
144 builder.setDefaultBehaviorProvider(provider);
145 PD_CIPHER_TRANSFORMATION = builder.getInstance();
146 INSTANCE.registerPropertyDefinition(PD_CIPHER_TRANSFORMATION);
147 }
148
149
150
151 // Build the "digest-algorithm" property definition.
152 static {
153 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "digest-algorithm");
154 builder.setOption(PropertyOption.ADVANCED);
155 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "digest-algorithm"));
156 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("SHA-1");
157 builder.setDefaultBehaviorProvider(provider);
158 PD_DIGEST_ALGORITHM = builder.getInstance();
159 INSTANCE.registerPropertyDefinition(PD_DIGEST_ALGORITHM);
160 }
161
162
163
164 // Build the "key-wrapping-transformation" property definition.
165 static {
166 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "key-wrapping-transformation");
167 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "key-wrapping-transformation"));
168 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("RSA/ECB/OAEPWITHSHA-1ANDMGF1PADDING");
169 builder.setDefaultBehaviorProvider(provider);
170 PD_KEY_WRAPPING_TRANSFORMATION = builder.getInstance();
171 INSTANCE.registerPropertyDefinition(PD_KEY_WRAPPING_TRANSFORMATION);
172 }
173
174
175
176 // Build the "mac-algorithm" property definition.
177 static {
178 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "mac-algorithm");
179 builder.setOption(PropertyOption.ADVANCED);
180 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "mac-algorithm"));
181 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("HmacSHA1");
182 builder.setDefaultBehaviorProvider(provider);
183 PD_MAC_ALGORITHM = builder.getInstance();
184 INSTANCE.registerPropertyDefinition(PD_MAC_ALGORITHM);
185 }
186
187
188
189 // Build the "mac-key-length" property definition.
190 static {
191 IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "mac-key-length");
192 builder.setOption(PropertyOption.ADVANCED);
193 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "mac-key-length"));
194 DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("128");
195 builder.setDefaultBehaviorProvider(provider);
196 PD_MAC_KEY_LENGTH = builder.getInstance();
197 INSTANCE.registerPropertyDefinition(PD_MAC_KEY_LENGTH);
198 }
199
200
201
202 // Build the "ssl-cert-nickname" property definition.
203 static {
204 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "ssl-cert-nickname");
205 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "ssl-cert-nickname"));
206 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "ssl-cert-nickname"));
207 PD_SSL_CERT_NICKNAME = builder.getInstance();
208 INSTANCE.registerPropertyDefinition(PD_SSL_CERT_NICKNAME);
209 }
210
211
212
213 // Build the "ssl-cipher-suite" property definition.
214 static {
215 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "ssl-cipher-suite");
216 builder.setOption(PropertyOption.MULTI_VALUED);
217 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "ssl-cipher-suite"));
218 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "ssl-cipher-suite"));
219 PD_SSL_CIPHER_SUITE = builder.getInstance();
220 INSTANCE.registerPropertyDefinition(PD_SSL_CIPHER_SUITE);
221 }
222
223
224
225 // Build the "ssl-encryption" property definition.
226 static {
227 BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "ssl-encryption");
228 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "ssl-encryption"));
229 DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
230 builder.setDefaultBehaviorProvider(provider);
231 PD_SSL_ENCRYPTION = builder.getInstance();
232 INSTANCE.registerPropertyDefinition(PD_SSL_ENCRYPTION);
233 }
234
235
236
237 // Build the "ssl-protocol" property definition.
238 static {
239 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "ssl-protocol");
240 builder.setOption(PropertyOption.MULTI_VALUED);
241 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "ssl-protocol"));
242 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "ssl-protocol"));
243 PD_SSL_PROTOCOL = builder.getInstance();
244 INSTANCE.registerPropertyDefinition(PD_SSL_PROTOCOL);
245 }
246
247
248
249 // Register the tags associated with this managed object definition.
250 static {
251 INSTANCE.registerTag(Tag.valueOf("security"));
252 }
253
254
255
256 /**
257 * Get the Crypto Manager configuration definition singleton.
258 *
259 * @return Returns the Crypto Manager configuration definition
260 * singleton.
261 */
262 public static CryptoManagerCfgDefn getInstance() {
263 return INSTANCE;
264 }
265
266
267
268 /**
269 * Private constructor.
270 */
271 private CryptoManagerCfgDefn() {
272 super("crypto-manager", TopCfgDefn.getInstance());
273 }
274
275
276
277 /**
278 * {@inheritDoc}
279 */
280 public CryptoManagerCfgClient createClientConfiguration(
281 ManagedObject<? extends CryptoManagerCfgClient> impl) {
282 return new CryptoManagerCfgClientImpl(impl);
283 }
284
285
286
287 /**
288 * {@inheritDoc}
289 */
290 public CryptoManagerCfg createServerConfiguration(
291 ServerManagedObject<? extends CryptoManagerCfg> impl) {
292 return new CryptoManagerCfgServerImpl(impl);
293 }
294
295
296
297 /**
298 * {@inheritDoc}
299 */
300 public Class<CryptoManagerCfg> getServerConfigurationClass() {
301 return CryptoManagerCfg.class;
302 }
303
304
305
306 /**
307 * Get the "cipher-key-length" property definition.
308 * <p>
309 * Specifies the key length in bits for the preferred cipher.
310 *
311 * @return Returns the "cipher-key-length" property definition.
312 */
313 public IntegerPropertyDefinition getCipherKeyLengthPropertyDefinition() {
314 return PD_CIPHER_KEY_LENGTH;
315 }
316
317
318
319 /**
320 * Get the "cipher-transformation" property definition.
321 * <p>
322 * Specifies the cipher for the Directory Server using the syntax
323 * algorithm/mode/padding.
324 * <p>
325 * The full transformation is required: specifying only an algorithm
326 * and allowing the cipher provider to supply the default mode and
327 * padding is not supported, because there is no guarantee these
328 * default values are the same among different implementations. Some
329 * cipher algorithms, including RC4 and ARCFOUR, do not have a mode
330 * or padding, and hence must be specified using NONE for the mode
331 * field and NoPadding for the padding field. For example,
332 * RC4/NONE/NoPadding.
333 *
334 * @return Returns the "cipher-transformation" property definition.
335 */
336 public StringPropertyDefinition getCipherTransformationPropertyDefinition() {
337 return PD_CIPHER_TRANSFORMATION;
338 }
339
340
341
342 /**
343 * Get the "digest-algorithm" property definition.
344 * <p>
345 * Specifies the preferred message digest algorithm for the
346 * Directory Server.
347 *
348 * @return Returns the "digest-algorithm" property definition.
349 */
350 public StringPropertyDefinition getDigestAlgorithmPropertyDefinition() {
351 return PD_DIGEST_ALGORITHM;
352 }
353
354
355
356 /**
357 * Get the "key-wrapping-transformation" property definition.
358 * <p>
359 * The preferred key wrapping transformation for the Directory
360 * Server. This value must be the same for all server instances in a
361 * replication topology.
362 *
363 * @return Returns the "key-wrapping-transformation" property definition.
364 */
365 public StringPropertyDefinition getKeyWrappingTransformationPropertyDefinition() {
366 return PD_KEY_WRAPPING_TRANSFORMATION;
367 }
368
369
370
371 /**
372 * Get the "mac-algorithm" property definition.
373 * <p>
374 * Specifies the preferred MAC algorithm for the Directory Server.
375 *
376 * @return Returns the "mac-algorithm" property definition.
377 */
378 public StringPropertyDefinition getMacAlgorithmPropertyDefinition() {
379 return PD_MAC_ALGORITHM;
380 }
381
382
383
384 /**
385 * Get the "mac-key-length" property definition.
386 * <p>
387 * Specifies the key length in bits for the preferred MAC algorithm.
388 *
389 * @return Returns the "mac-key-length" property definition.
390 */
391 public IntegerPropertyDefinition getMacKeyLengthPropertyDefinition() {
392 return PD_MAC_KEY_LENGTH;
393 }
394
395
396
397 /**
398 * Get the "ssl-cert-nickname" property definition.
399 * <p>
400 * Specifies the nickname (also called the alias) of the certificate
401 * that the Crypto Manager should use when performing SSL
402 * communication.
403 * <p>
404 * This is only applicable when the Crypto Manager is configured to
405 * use SSL.
406 *
407 * @return Returns the "ssl-cert-nickname" property definition.
408 */
409 public StringPropertyDefinition getSSLCertNicknamePropertyDefinition() {
410 return PD_SSL_CERT_NICKNAME;
411 }
412
413
414
415 /**
416 * Get the "ssl-cipher-suite" property definition.
417 * <p>
418 * Specifies the names of the SSL cipher suites that are allowed for
419 * use in SSL or TLS communication.
420 *
421 * @return Returns the "ssl-cipher-suite" property definition.
422 */
423 public StringPropertyDefinition getSSLCipherSuitePropertyDefinition() {
424 return PD_SSL_CIPHER_SUITE;
425 }
426
427
428
429 /**
430 * Get the "ssl-encryption" property definition.
431 * <p>
432 * Specifies whether SSL/TLS is used to provide encrypted
433 * communication between two OpenDS server components.
434 *
435 * @return Returns the "ssl-encryption" property definition.
436 */
437 public BooleanPropertyDefinition getSSLEncryptionPropertyDefinition() {
438 return PD_SSL_ENCRYPTION;
439 }
440
441
442
443 /**
444 * Get the "ssl-protocol" property definition.
445 * <p>
446 * Specifies the names of the SSL protocols that are allowed for use
447 * in SSL or TLS communication.
448 *
449 * @return Returns the "ssl-protocol" property definition.
450 */
451 public StringPropertyDefinition getSSLProtocolPropertyDefinition() {
452 return PD_SSL_PROTOCOL;
453 }
454
455
456
457 /**
458 * Managed object client implementation.
459 */
460 private static class CryptoManagerCfgClientImpl implements
461 CryptoManagerCfgClient {
462
463 // Private implementation.
464 private ManagedObject<? extends CryptoManagerCfgClient> impl;
465
466
467
468 // Private constructor.
469 private CryptoManagerCfgClientImpl(
470 ManagedObject<? extends CryptoManagerCfgClient> impl) {
471 this.impl = impl;
472 }
473
474
475
476 /**
477 * {@inheritDoc}
478 */
479 public int getCipherKeyLength() {
480 return impl.getPropertyValue(INSTANCE.getCipherKeyLengthPropertyDefinition());
481 }
482
483
484
485 /**
486 * {@inheritDoc}
487 */
488 public void setCipherKeyLength(Integer value) {
489 impl.setPropertyValue(INSTANCE.getCipherKeyLengthPropertyDefinition(), value);
490 }
491
492
493
494 /**
495 * {@inheritDoc}
496 */
497 public String getCipherTransformation() {
498 return impl.getPropertyValue(INSTANCE.getCipherTransformationPropertyDefinition());
499 }
500
501
502
503 /**
504 * {@inheritDoc}
505 */
506 public void setCipherTransformation(String value) {
507 impl.setPropertyValue(INSTANCE.getCipherTransformationPropertyDefinition(), value);
508 }
509
510
511
512 /**
513 * {@inheritDoc}
514 */
515 public String getDigestAlgorithm() {
516 return impl.getPropertyValue(INSTANCE.getDigestAlgorithmPropertyDefinition());
517 }
518
519
520
521 /**
522 * {@inheritDoc}
523 */
524 public void setDigestAlgorithm(String value) {
525 impl.setPropertyValue(INSTANCE.getDigestAlgorithmPropertyDefinition(), value);
526 }
527
528
529
530 /**
531 * {@inheritDoc}
532 */
533 public String getKeyWrappingTransformation() {
534 return impl.getPropertyValue(INSTANCE.getKeyWrappingTransformationPropertyDefinition());
535 }
536
537
538
539 /**
540 * {@inheritDoc}
541 */
542 public void setKeyWrappingTransformation(String value) {
543 impl.setPropertyValue(INSTANCE.getKeyWrappingTransformationPropertyDefinition(), value);
544 }
545
546
547
548 /**
549 * {@inheritDoc}
550 */
551 public String getMacAlgorithm() {
552 return impl.getPropertyValue(INSTANCE.getMacAlgorithmPropertyDefinition());
553 }
554
555
556
557 /**
558 * {@inheritDoc}
559 */
560 public void setMacAlgorithm(String value) {
561 impl.setPropertyValue(INSTANCE.getMacAlgorithmPropertyDefinition(), value);
562 }
563
564
565
566 /**
567 * {@inheritDoc}
568 */
569 public int getMacKeyLength() {
570 return impl.getPropertyValue(INSTANCE.getMacKeyLengthPropertyDefinition());
571 }
572
573
574
575 /**
576 * {@inheritDoc}
577 */
578 public void setMacKeyLength(Integer value) {
579 impl.setPropertyValue(INSTANCE.getMacKeyLengthPropertyDefinition(), value);
580 }
581
582
583
584 /**
585 * {@inheritDoc}
586 */
587 public String getSSLCertNickname() {
588 return impl.getPropertyValue(INSTANCE.getSSLCertNicknamePropertyDefinition());
589 }
590
591
592
593 /**
594 * {@inheritDoc}
595 */
596 public void setSSLCertNickname(String value) {
597 impl.setPropertyValue(INSTANCE.getSSLCertNicknamePropertyDefinition(), value);
598 }
599
600
601
602 /**
603 * {@inheritDoc}
604 */
605 public SortedSet<String> getSSLCipherSuite() {
606 return impl.getPropertyValues(INSTANCE.getSSLCipherSuitePropertyDefinition());
607 }
608
609
610
611 /**
612 * {@inheritDoc}
613 */
614 public void setSSLCipherSuite(Collection<String> values) {
615 impl.setPropertyValues(INSTANCE.getSSLCipherSuitePropertyDefinition(), values);
616 }
617
618
619
620 /**
621 * {@inheritDoc}
622 */
623 public boolean isSSLEncryption() {
624 return impl.getPropertyValue(INSTANCE.getSSLEncryptionPropertyDefinition());
625 }
626
627
628
629 /**
630 * {@inheritDoc}
631 */
632 public void setSSLEncryption(Boolean value) {
633 impl.setPropertyValue(INSTANCE.getSSLEncryptionPropertyDefinition(), value);
634 }
635
636
637
638 /**
639 * {@inheritDoc}
640 */
641 public SortedSet<String> getSSLProtocol() {
642 return impl.getPropertyValues(INSTANCE.getSSLProtocolPropertyDefinition());
643 }
644
645
646
647 /**
648 * {@inheritDoc}
649 */
650 public void setSSLProtocol(Collection<String> values) {
651 impl.setPropertyValues(INSTANCE.getSSLProtocolPropertyDefinition(), values);
652 }
653
654
655
656 /**
657 * {@inheritDoc}
658 */
659 public ManagedObjectDefinition<? extends CryptoManagerCfgClient, ? extends CryptoManagerCfg> definition() {
660 return INSTANCE;
661 }
662
663
664
665 /**
666 * {@inheritDoc}
667 */
668 public PropertyProvider properties() {
669 return impl;
670 }
671
672
673
674 /**
675 * {@inheritDoc}
676 */
677 public void commit() throws ManagedObjectAlreadyExistsException,
678 MissingMandatoryPropertiesException, ConcurrentModificationException,
679 OperationRejectedException, AuthorizationException,
680 CommunicationException {
681 impl.commit();
682 }
683
684 }
685
686
687
688 /**
689 * Managed object server implementation.
690 */
691 private static class CryptoManagerCfgServerImpl implements
692 CryptoManagerCfg {
693
694 // Private implementation.
695 private ServerManagedObject<? extends CryptoManagerCfg> impl;
696
697 // The value of the "cipher-key-length" property.
698 private final int pCipherKeyLength;
699
700 // The value of the "cipher-transformation" property.
701 private final String pCipherTransformation;
702
703 // The value of the "digest-algorithm" property.
704 private final String pDigestAlgorithm;
705
706 // The value of the "key-wrapping-transformation" property.
707 private final String pKeyWrappingTransformation;
708
709 // The value of the "mac-algorithm" property.
710 private final String pMacAlgorithm;
711
712 // The value of the "mac-key-length" property.
713 private final int pMacKeyLength;
714
715 // The value of the "ssl-cert-nickname" property.
716 private final String pSSLCertNickname;
717
718 // The value of the "ssl-cipher-suite" property.
719 private final SortedSet<String> pSSLCipherSuite;
720
721 // The value of the "ssl-encryption" property.
722 private final boolean pSSLEncryption;
723
724 // The value of the "ssl-protocol" property.
725 private final SortedSet<String> pSSLProtocol;
726
727
728
729 // Private constructor.
730 private CryptoManagerCfgServerImpl(ServerManagedObject<? extends CryptoManagerCfg> impl) {
731 this.impl = impl;
732 this.pCipherKeyLength = impl.getPropertyValue(INSTANCE.getCipherKeyLengthPropertyDefinition());
733 this.pCipherTransformation = impl.getPropertyValue(INSTANCE.getCipherTransformationPropertyDefinition());
734 this.pDigestAlgorithm = impl.getPropertyValue(INSTANCE.getDigestAlgorithmPropertyDefinition());
735 this.pKeyWrappingTransformation = impl.getPropertyValue(INSTANCE.getKeyWrappingTransformationPropertyDefinition());
736 this.pMacAlgorithm = impl.getPropertyValue(INSTANCE.getMacAlgorithmPropertyDefinition());
737 this.pMacKeyLength = impl.getPropertyValue(INSTANCE.getMacKeyLengthPropertyDefinition());
738 this.pSSLCertNickname = impl.getPropertyValue(INSTANCE.getSSLCertNicknamePropertyDefinition());
739 this.pSSLCipherSuite = impl.getPropertyValues(INSTANCE.getSSLCipherSuitePropertyDefinition());
740 this.pSSLEncryption = impl.getPropertyValue(INSTANCE.getSSLEncryptionPropertyDefinition());
741 this.pSSLProtocol = impl.getPropertyValues(INSTANCE.getSSLProtocolPropertyDefinition());
742 }
743
744
745
746 /**
747 * {@inheritDoc}
748 */
749 public void addChangeListener(
750 ConfigurationChangeListener<CryptoManagerCfg> listener) {
751 impl.registerChangeListener(listener);
752 }
753
754
755
756 /**
757 * {@inheritDoc}
758 */
759 public void removeChangeListener(
760 ConfigurationChangeListener<CryptoManagerCfg> listener) {
761 impl.deregisterChangeListener(listener);
762 }
763
764
765
766 /**
767 * {@inheritDoc}
768 */
769 public int getCipherKeyLength() {
770 return pCipherKeyLength;
771 }
772
773
774
775 /**
776 * {@inheritDoc}
777 */
778 public String getCipherTransformation() {
779 return pCipherTransformation;
780 }
781
782
783
784 /**
785 * {@inheritDoc}
786 */
787 public String getDigestAlgorithm() {
788 return pDigestAlgorithm;
789 }
790
791
792
793 /**
794 * {@inheritDoc}
795 */
796 public String getKeyWrappingTransformation() {
797 return pKeyWrappingTransformation;
798 }
799
800
801
802 /**
803 * {@inheritDoc}
804 */
805 public String getMacAlgorithm() {
806 return pMacAlgorithm;
807 }
808
809
810
811 /**
812 * {@inheritDoc}
813 */
814 public int getMacKeyLength() {
815 return pMacKeyLength;
816 }
817
818
819
820 /**
821 * {@inheritDoc}
822 */
823 public String getSSLCertNickname() {
824 return pSSLCertNickname;
825 }
826
827
828
829 /**
830 * {@inheritDoc}
831 */
832 public SortedSet<String> getSSLCipherSuite() {
833 return pSSLCipherSuite;
834 }
835
836
837
838 /**
839 * {@inheritDoc}
840 */
841 public boolean isSSLEncryption() {
842 return pSSLEncryption;
843 }
844
845
846
847 /**
848 * {@inheritDoc}
849 */
850 public SortedSet<String> getSSLProtocol() {
851 return pSSLProtocol;
852 }
853
854
855
856 /**
857 * {@inheritDoc}
858 */
859 public Class<? extends CryptoManagerCfg> configurationClass() {
860 return CryptoManagerCfg.class;
861 }
862
863
864
865 /**
866 * {@inheritDoc}
867 */
868 public DN dn() {
869 return impl.getDN();
870 }
871
872 }
873 }