You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oltu.apache.org by si...@apache.org on 2010/07/11 12:10:22 UTC
svn commit: r963036 -
/incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1SigningKey.java
Author: simonetripodi
Date: Sun Jul 11 10:10:22 2010
New Revision: 963036
URL: http://svn.apache.org/viewvc?rev=963036&view=rev
Log:
first checkin of PemRsaSha1SigningKey class
Added:
incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1SigningKey.java (with props)
Added: incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1SigningKey.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1SigningKey.java?rev=963036&view=auto
==============================================================================
--- incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1SigningKey.java (added)
+++ incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1SigningKey.java Sun Jul 11 10:10:22 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 PemRsaSha1SigningKey
+ extends AbstractRsaSha1Key
+ implements SigningKey {
+
+ public PemRsaSha1SigningKey(File certificateFileLocation)
+ throws SignatureException {
+ super(certificateFileLocation);
+ }
+
+ public PemRsaSha1SigningKey(String certificateClasspathLocation)
+ throws SignatureException {
+ super(certificateClasspathLocation);
+ }
+
+ public PemRsaSha1SigningKey(URL certificateURL) throws SignatureException {
+ super(certificateURL);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected byte[] readCertificate(InputStream input) throws Exception {
+ PemCertificateParser pemCertificateParser = new PemCertificateParser(input);
+ return pemCertificateParser.parsePrivateKey();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getValue() {
+ return null;
+ }
+
+}
Propchange: incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1SigningKey.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1SigningKey.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: incubator/amber/trunk/signature-api/src/main/java/org/apache/amber/signature/rsa/PemRsaSha1SigningKey.java
------------------------------------------------------------------------------
svn:mime-type = text/plain