// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __gnu_javax_crypto_jce_keyring_GnuKeyring__
#define __gnu_javax_crypto_jce_keyring_GnuKeyring__

#pragma interface

#include <java/security/KeyStoreSpi.h>
#include <gcj/array.h>

extern "Java"
{
  namespace java
  {
    namespace security
    {
      class Key;
      namespace cert
      {
        class Certificate;
      }
    }
  }
  namespace gnu
  {
    namespace javax
    {
      namespace crypto
      {
        namespace jce
        {
          namespace keyring
          {
            class GnuKeyring;
          }
        }
        namespace keyring
        {
          class IKeyring;
          class IPublicKeyring;
          class IPrivateKeyring;
        }
      }
    }
  }
}

class gnu::javax::crypto::jce::keyring::GnuKeyring : public ::java::security::KeyStoreSpi
{
public:
  virtual ::java::util::Enumeration *engineAliases ();
  virtual jboolean engineContainsAlias (::java::lang::String *);
  virtual void engineDeleteEntry (::java::lang::String *);
  virtual ::java::security::cert::Certificate *engineGetCertificate (::java::lang::String *);
  virtual ::java::lang::String *engineGetCertificateAlias (::java::security::cert::Certificate *);
  virtual void engineSetCertificateEntry (::java::lang::String *, ::java::security::cert::Certificate *);
  virtual JArray< ::java::security::cert::Certificate *> *engineGetCertificateChain (::java::lang::String *);
  virtual ::java::util::Date *engineGetCreationDate (::java::lang::String *);
  virtual ::java::security::Key *engineGetKey (::java::lang::String *, jcharArray);
  virtual void engineSetKeyEntry (::java::lang::String *, ::java::security::Key *, jcharArray, JArray< ::java::security::cert::Certificate *> *);
  virtual void engineSetKeyEntry (::java::lang::String *, jbyteArray, JArray< ::java::security::cert::Certificate *> *);
  virtual jboolean engineIsCertificateEntry (::java::lang::String *);
  virtual jboolean engineIsKeyEntry (::java::lang::String *);
  virtual void engineLoad (::java::io::InputStream *, jcharArray);
  virtual void engineStore (::java::io::OutputStream *, jcharArray);
  virtual jint engineSize ();
private:
  void ensureLoaded ();
  void loadPrivateKeyring (::java::io::InputStream *, jcharArray);
  void loadPublicKeyring (::java::io::InputStream *, jcharArray);
  ::java::util::Date *getCreationDate (::java::lang::String *, ::gnu::javax::crypto::keyring::IKeyring *);
  void createNewKeyrings ();
public:
  GnuKeyring ();
private:
  static ::java::util::logging::Logger *log;
  static ::java::lang::String *NOT_LOADED;
  jboolean __attribute__((aligned(__alignof__( ::java::security::KeyStoreSpi ))))  loaded;
  ::gnu::javax::crypto::keyring::IPrivateKeyring *privateKR;
  ::gnu::javax::crypto::keyring::IPublicKeyring *publicKR;
public:

  static ::java::lang::Class class$;
};

#endif /* __gnu_javax_crypto_jce_keyring_GnuKeyring__ */
