diff options
| author | Wyllys Ingersoll <Wyllys.Ingersoll@Sun.COM> | 2010-06-28 16:04:11 -0700 | 
|---|---|---|
| committer | Wyllys Ingersoll <Wyllys.Ingersoll@Sun.COM> | 2010-06-28 16:04:11 -0700 | 
| commit | 4f14b0f29aa144cc03efdde5508ae126ae197acf (patch) | |
| tree | 5292d99c7ec8374d412d58116e7bbc7279e72067 /usr/src/lib/libkmsagent/common/SOAP/KMS_CAClient.cpp | |
| parent | 1e49577a7fcde812700ded04431b49d67cc57d6d (diff) | |
| download | illumos-joyent-4f14b0f29aa144cc03efdde5508ae126ae197acf.tar.gz | |
PSARC 2010/195 PKCS11 KMS Provider
6944296 Solaris needs a PKCS#11 provider to allow access to KMS keystore functionality
Diffstat (limited to 'usr/src/lib/libkmsagent/common/SOAP/KMS_CAClient.cpp')
| -rw-r--r-- | usr/src/lib/libkmsagent/common/SOAP/KMS_CAClient.cpp | 148 | 
1 files changed, 148 insertions, 0 deletions
| diff --git a/usr/src/lib/libkmsagent/common/SOAP/KMS_CAClient.cpp b/usr/src/lib/libkmsagent/common/SOAP/KMS_CAClient.cpp new file mode 100644 index 0000000000..b5ea12986d --- /dev/null +++ b/usr/src/lib/libkmsagent/common/SOAP/KMS_CAClient.cpp @@ -0,0 +1,148 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + */ + +/* KMS_CAClient.cpp +   Generated by gSOAP 2.7.17 from ../gsoapStubs/CAService/KMS_CA_SOAP.h +   Copyright(C) 2000-2010, Robert van Engelen, Genivia Inc. All Rights Reserved. +   This part of the software is released under one of the following licenses: +   GPL, the gSOAP public license, or Genivia's license for commercial use. +*/ + +#if defined(__BORLANDC__) +#pragma option push -w-8060 +#pragma option push -w-8004 +#endif +#include "KMS_CAH.h" + +namespace KMS_CA { + +SOAP_SOURCE_STAMP("@(#) KMS_CAClient.cpp ver 2.7.17 2010-06-08 19:16:38 GMT") + + +SOAP_FMAC5 int SOAP_FMAC6 soap_call_KMS_CA__RetrieveRootCACertificate(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *EntityID, struct KMS_CA__RetrieveRootCACertificateResponse &result) +{	struct KMS_CA__RetrieveRootCACertificate soap_tmp_KMS_CA__RetrieveRootCACertificate; +	soap_tmp_KMS_CA__RetrieveRootCACertificate.EntityID = EntityID; +	soap_begin(soap); +	soap_serializeheader(soap); +	soap_serialize_KMS_CA__RetrieveRootCACertificate(soap, &soap_tmp_KMS_CA__RetrieveRootCACertificate); +	if (soap_begin_count(soap)) +		return soap->error; +	if (soap->mode & SOAP_IO_LENGTH) +	{	if (soap_envelope_begin_out(soap) +		 || soap_putheader(soap) +		 || soap_body_begin_out(soap) +		 || soap_put_KMS_CA__RetrieveRootCACertificate(soap, &soap_tmp_KMS_CA__RetrieveRootCACertificate, "KMS-CA:RetrieveRootCACertificate", NULL) +		 || soap_body_end_out(soap) +		 || soap_envelope_end_out(soap)) +			 return soap->error; +	} +	if (soap_end_count(soap)) +		return soap->error; +	if (soap_connect(soap, soap_endpoint, soap_action) +	 || soap_envelope_begin_out(soap) +	 || soap_putheader(soap) +	 || soap_body_begin_out(soap) +	 || soap_put_KMS_CA__RetrieveRootCACertificate(soap, &soap_tmp_KMS_CA__RetrieveRootCACertificate, "KMS-CA:RetrieveRootCACertificate", NULL) +	 || soap_body_end_out(soap) +	 || soap_envelope_end_out(soap) +	 || soap_end_send(soap)) +		return soap_closesock(soap); +	if (!&result) +		return soap_closesock(soap); +	soap_default_KMS_CA__RetrieveRootCACertificateResponse(soap, &result); +	if (soap_begin_recv(soap) +	 || soap_envelope_begin_in(soap) +	 || soap_recv_header(soap) +	 || soap_body_begin_in(soap)) +		return soap_closesock(soap); +	if (soap_recv_fault(soap, 1)) +		return soap->error; +	soap_get_KMS_CA__RetrieveRootCACertificateResponse(soap, &result, "", ""); +	if (soap->error) +		return soap_recv_fault(soap, 0); +	if (soap_body_end_in(soap) +	 || soap_envelope_end_in(soap) +	 || soap_end_recv(soap)) +		return soap_closesock(soap); +	return soap_closesock(soap); +} + +SOAP_FMAC5 int SOAP_FMAC6 soap_call_KMS_CA__RetrieveLocalClock(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *EntityID, struct KMS_CA__RetrieveLocalClockResponse &result) +{	struct KMS_CA__RetrieveLocalClock soap_tmp_KMS_CA__RetrieveLocalClock; +	soap_tmp_KMS_CA__RetrieveLocalClock.EntityID = EntityID; +	soap_begin(soap); +	soap_serializeheader(soap); +	soap_serialize_KMS_CA__RetrieveLocalClock(soap, &soap_tmp_KMS_CA__RetrieveLocalClock); +	if (soap_begin_count(soap)) +		return soap->error; +	if (soap->mode & SOAP_IO_LENGTH) +	{	if (soap_envelope_begin_out(soap) +		 || soap_putheader(soap) +		 || soap_body_begin_out(soap) +		 || soap_put_KMS_CA__RetrieveLocalClock(soap, &soap_tmp_KMS_CA__RetrieveLocalClock, "KMS-CA:RetrieveLocalClock", NULL) +		 || soap_body_end_out(soap) +		 || soap_envelope_end_out(soap)) +			 return soap->error; +	} +	if (soap_end_count(soap)) +		return soap->error; +	if (soap_connect(soap, soap_endpoint, soap_action) +	 || soap_envelope_begin_out(soap) +	 || soap_putheader(soap) +	 || soap_body_begin_out(soap) +	 || soap_put_KMS_CA__RetrieveLocalClock(soap, &soap_tmp_KMS_CA__RetrieveLocalClock, "KMS-CA:RetrieveLocalClock", NULL) +	 || soap_body_end_out(soap) +	 || soap_envelope_end_out(soap) +	 || soap_end_send(soap)) +		return soap_closesock(soap); +	if (!&result) +		return soap_closesock(soap); +	soap_default_KMS_CA__RetrieveLocalClockResponse(soap, &result); +	if (soap_begin_recv(soap) +	 || soap_envelope_begin_in(soap) +	 || soap_recv_header(soap) +	 || soap_body_begin_in(soap)) +		return soap_closesock(soap); +	if (soap_recv_fault(soap, 1)) +		return soap->error; +	soap_get_KMS_CA__RetrieveLocalClockResponse(soap, &result, "", ""); +	if (soap->error) +		return soap_recv_fault(soap, 0); +	if (soap_body_end_in(soap) +	 || soap_envelope_end_in(soap) +	 || soap_end_recv(soap)) +		return soap_closesock(soap); +	return soap_closesock(soap); +} + +} // namespace KMS_CA + + +#if defined(__BORLANDC__) +#pragma option pop +#pragma option pop +#endif + +/* End of KMS_CAClient.cpp */ | 
