incubator-amber-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r963055 - /incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1VeifyingKey.java
Date Sun, 11 Jul 2010 11:38:02 GMT
Author: simonetripodi
Date: Sun Jul 11 11:38:01 2010
New Revision: 963055

URL: http://svn.apache.org/viewvc?rev=963055&view=rev
Log:
first checkin of PemRsaSha1VeifyingKey class

Added:
    incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1VeifyingKey.java
  (with props)

Added: incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1VeifyingKey.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1VeifyingKey.java?rev=963055&view=auto
==============================================================================
--- incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1VeifyingKey.java
(added)
+++ incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1VeifyingKey.java
Sun Jul 11 11:38:01 2010
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.amber.signature.rsa;
+
+import java.io.File;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.apache.amber.signature.SignatureException;
+import org.apache.amber.signature.SigningKey;
+
+/**
+ * 
+ *
+ * @version $Id$
+ */
+public final class PemRsaSha1VeifyingKey
+        extends AbstractRsaSha1Key
+        implements SigningKey {
+
+    public PemRsaSha1VeifyingKey(File certificateFileLocation)
+            throws SignatureException {
+        super(certificateFileLocation);
+    }
+
+    public PemRsaSha1VeifyingKey(String certificateClasspathLocation)
+            throws SignatureException {
+        super(certificateClasspathLocation);
+    }
+
+    public PemRsaSha1VeifyingKey(URL certificateURL) throws SignatureException {
+        super(certificateURL);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected byte[] readCertificate(InputStream input) throws Exception {
+        PemCertificateParser pemCertificateParser = new PemCertificateParser(input);
+        return pemCertificateParser.parsePublicCertificate();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getValue() {
+        return null;
+    }
+
+}

Propchange: incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1VeifyingKey.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1VeifyingKey.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1VeifyingKey.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message