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